soup-message-io: fix retry-after-unexpected-connection-close
authorDan Winship <danw@gnome.org>
Wed, 10 Nov 2010 21:48:56 +0000 (16:48 -0500)
committerDan Winship <danw@gnome.org>
Wed, 10 Nov 2010 21:48:56 +0000 (16:48 -0500)
commitd4cc1a0cdd62fc3669f4ec5a8974c61aee9e9ce2
tree45671a25b12f9ce8428fb6706abbbc1e32fea833
parent5beca05b68f92b69bb47ade94fb4857c5ccf8b76
soup-message-io: fix retry-after-unexpected-connection-close

When sending a request on a previously-used connection, we have to
deal with the possibility of the server deciding to time out the
connection right as we start sending data (which sounds like a crazy
race condition, but is in fact pretty much standard behavior). This
got broken in the connection/session reorg earlier in the year. Fix
it.

Also, add a test to misc-test for this.

Based on patch from Sergio Villar.

https://bugzilla.gnome.org/show_bug.cgi?id=631525
libsoup/soup-message-io.c
tests/misc-test.c