soup-request-http: fix usage with non-default-context
authorDan Winship <danw@gnome.org>
Sun, 31 Jul 2011 15:28:35 +0000 (11:28 -0400)
committerDan Winship <danw@gnome.org>
Sun, 31 Jul 2011 15:33:38 +0000 (11:33 -0400)
commit59a25e47cd80ac39c03d74d774121222a4074c87
treee94648f8f9233331446bb977422cef9024eb354e
parent6e1b5647a13e82b2c42a3ecc749ce9a19f40480a
soup-request-http: fix usage with non-default-context

SoupHTTPInputStream was doing I/O in a thread if the session didn't
use the global default context. But really, it should have been
checking the thread-default context instead. And anyway, the threaded
version doesn't actually work, it turns out. So, fix the check, make
it into a g_return_if_fail(), and remove the threaded codepath.

Also, fix a handful of places that were adding sources to the global
default context rather than the thread-default/SoupSession context.

Add tests/requester-test to do some basic
SoupRequester/SoupRequestHTTP/SoupHTTPInputStream testing.

https://bugzilla.gnome.org/show_bug.cgi?id=653707
libsoup/soup-cache.c
libsoup/soup-http-input-stream.c
libsoup/soup-request-http.c
tests/Makefile.am
tests/requester-test.c [new file with mode: 0644]