I am using the HTTP client of inets-3.0.3.
When I do a synchronous HTTP request, and the process from which I do the request receives some message X while waiting for the result, I get this other message X as the result.
This is to be expected when I read the code of http.erl, but before I had read the code, I had not expected this. The http:request_sync/4 accepts all messages, but in my case this is a message that is not related to the HTTP request: it is a message that I send from some other process.
Could I remove lines 183 and 184 from http.erl without harm, or can indeed other HTTP-related messages arrive, that are not matched by the existing clauses? I have removed them for now, but now I may miss some error messages, of which I do not know. I do not know which these are, otherwise I could match them explicitly.
Another solution may be, to spawn a process for the HTTP request, but it seems to me that the HTTP client code of inets should already take care of this.
System Engineer, Technology Strategies
Service Network and Applications
Ericsson Telecommunicatie B.V.
Research and Development
Tel.: +31 161 242582
Fax: +31 161 242206