SoupHTTPInputStream: change handling of error responses
Old behavior:
- If the (initial) response status code is 3xx/401/407, and the
message is successfully restarted, then just throw away the
initial response.
- If the (final) response status code is 2xx, then stream the body.
- Otherwise, return a GError from soup_http_input_stream_send*(),
and don't stream the body.
This worked OK for gvfs, which never cared about the bodies of 4xx
responses, but was problematic for WebKitGTK, which ended up needing
three separate (but interwoven) codepaths to handle all the cases.
(And still ended up handling 407 wrong.)
New behavior:
- If the (initial) response status code is 3xx/401/407, and the
message is successfully restarted, then just throw away the
initial response.
- The body of the (final) response is always streamed to the caller.
- A GError is only returned on transport errors, not on 4xx/5xx
responses
(This is an API break, but SoupHTTPInputStream is not API-stable.)
https://bugzilla.gnome.org/show_bug.cgi?id=663451