GNOME Bugzilla – Bug 710961
Content of first request might be leaked into the second one making it unparsable
Last modified: 2013-10-27 16:20:28 UTC
In case two requests are made on a persistent connection to the same host and contents of the first request body are not read, they will leak into the second request (before headers) making the second one unparsable. To explain what happens step by step: 1. Make request to, for example, http://httpbin.org/status/418 with soup_session_send_async; 2. Do not read response contents at all, cancel the message instead (soup_session_cancel_message); 3. Make another request to the same host (e.g. http://httpbin.org/html); 4. The message will become corrupt and trying to soup_session_send_finish, one will get GError with “Could not parse HTTP response”. Looking with gdb at soup_headers_parse_response, while parsing the second message the str argument will have the body of first request before the headers making it impossible to parse the request. As things are now one has to explicitly read all the contents from the input stream after (or before) cancelling the message.
Created attachment 258212 [details] Minimal test case
thanks, already fixed in git, and will be in 2.44.2 *** This bug has been marked as a duplicate of bug 710494 ***