summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2012-10-29soup_header_parse_param_list: return empty GHashTable instead of NULLDan Winship1-6/+1
Special-casing the "no parameters" case here complicates other code (eg, currently it causes warnings in SoupCache if you get an empty Cache-Control header).
2012-10-22tests: add support for Apache 2.4Dan Winship4-7/+310
2012-10-22Remove now-unnecessary g_type_init() callsDan Winship5-7/+0
2012-10-20soup-request: Add support to handle gresource URI requestsCarlos Garcia Campos3-9/+322
GFile already supports gresource when using g_file_new_for_uri() with a resource:// URI. We can add "resource" as a valid scheme for SoupRequestFile and make sure the GFile is created with the gresource URI for gresource requests. https://bugzilla.gnome.org/show_bug.cgi?id=682721
2012-10-16soup-auth-manager-ntlm.c: don't include the default domain in the responseDan Winship1-1/+1
If the user didn't specify a domain in their username, then send "" for the domain in the response, rather than echoing back the default domain. This is apparently more compatible with what other apps do. https://bugzilla.gnome.org/show_bug.cgi?id=624613
2012-08-25SoupConnection: fix up ::event signal emissionsDan Winship1-0/+116
And add a test to make sure that all expected events are emitted, in the correct order.
2012-08-25SoupConnection: fix up states during connectionDan Winship1-0/+133
In particular, when doing an https CONNECT, make sure the connection never observably switches to the "IDLE" state. Add a test for this.
2012-08-20Add missing file for last commitGustavo Noronha Silva1-0/+617
2012-08-20Add SoupMultipartInputStream for handling multipart responsesGustavo Noronha Silva1-0/+3
SoupMultipartInputStream can be used by the API user to wrap the input stream, and provides API to obtain the next part and its headers, using a SoupFilterInputStream internally for buffer management. https://bugzilla.gnome.org/show_bug.cgi?id=656684
2012-08-11valgrindageDan Winship7-4/+90
2012-08-10tests: parallelize proxy-test to make it fasterDan Winship3-7/+67
TODO: parallelize auth-test and timeout-test, make it easier to use.
2012-08-07SoupTLD: fix a regression in soup_tld_is_public_suffix()Sergio Villar Senin1-32/+53
soup_tld_is_public_suffix() was not returning TRUE for well known TLDs as ".com" after cbae89f4. Also added some extra documentation to soup_tld_get_base_domain() in order to make explicit that it returns NULL for private URLs. Reworked unit tests in order to allow them detect these regressions. https://bugzilla.gnome.org/show_bug.cgi?id=681085
2012-08-06soup-xmlrpc: fix parsing of <methodCall> without <params>Dan Winship3-19/+104
If a method takes no parameters, you can leave out the <params> section of <methodCall>, but soup_xmlrpc_parse_method_call() was requiring it anyway. Fix that and add some tests of parameter-less methods. https://bugzilla.gnome.org/show_bug.cgi?id=671661
2012-08-06Add a simple regression test for unbound socketsSimon McVittie2-0/+116
https://bugzilla.gnome.org/show_bug.cgi?id=673083
2012-08-06tld-test: update for changes to TLD dataDan Winship1-7/+7
2012-07-26Fix building with MinGW compilerPaweł Forysiuk3-0/+12
2012-07-25test-utils: simplify the SoupRequest test utils a bitDan Winship8-83/+58
2012-07-24SoupSessionAsync: fix handling of timed-out SoupRequestsDan Winship1-21/+186
When using the SoupRequest API, a message that hit SOUP_SESSION_TIMEOUT would error out, but would not emit "finished" or get fully removed from the queue. Fix that and add SoupRequest tests to timeout-test (along with tests that "finished" gets emitted).
2012-07-17SoupConverterWrapper: handle empty "compressed" responsesDan Winship1-2/+47
If a server sends an empty response but includes a Content-Encoding header (in particular, in a HEAD or 304 response), suppress the PARTIAL_INPUT error from the GZlibDecompressor and just return 0. https://bugzilla.gnome.org/show_bug.cgi?id=679527 (?)
2012-07-17soup_uri_normalize: more fixesDan Winship1-0/+48
uri_normalized_copy() should not go into fixup mode when it sees a non-printable character if that character is in @unescape_extra. Likewise, if it does go into fixup mode, it shouldn't fix up the @unescape_extra characters. https://bugzilla.gnome.org/show_bug.cgi?id=680018
2012-07-16soup-tld: do not consider non suffixed domains as publicDan Winship1-11/+14
Non suffixed hostnames (used in many intranet applications) should not be considered as public. Based on a patch from Sergio Villar Senin. https://bugzilla.gnome.org/show_bug.cgi?id=679230
2012-07-13Fix the retry-on-broken-connection codepath for SoupRequestDan Winship1-3/+119
The retry-if-the-server-closes-the-connection-immediately code was only getting run in the SoupMessage API codepaths. Fit it into the right place in the SoupRequest paths too, and test that from connection-test. Might fix https://bugzilla.gnome.org/show_bug.cgi?id=679527 ?
2012-07-13Add some test-utils helpers for async SoupRequest usageDan Winship6-119/+115
2012-07-13Clean up includesDan Winship32-418/+132
Especially, include soup.h rather than individually including a bunch of other public soup-*.h files. Remove unnecessary system includes (many are leftovers from code that has moved down into glib).
2012-07-13Remove an unnecessary old demo program that doesn't work any moreDan Winship2-155/+0
2012-07-13requester-test: fix some debug printfsDan Winship1-2/+2
2012-07-10SoupCookie: ignore values on httponly and secure attributesDan Winship1-2/+110
The cookie parsing algorithm says to ignore values on attributes that aren't supposed to have them, so do that. Also add a test for this. Based on a patch from "Basavaraj". Also, drive-by bugfix in soup_cookie_to_set_cookie_header() / soup_cookies_to_response() (the SoupServer side of the cookie APIs), which were outputting "HttpOnly" if the cookie had the "secure" flag set, rather than the "http_only" flag. https://bugzilla.gnome.org/show_bug.cgi?id=678753
2012-07-10Fix cookies-test.c indentationDan Winship1-52/+52
2012-06-14soup-tld: added soup_tld_* utilsSergio Villar Senin2-0/+134
The soup_tld_* set of functions along with the list of public suffixes published in http://publicsuffix.org allows API clients to get the base domain of a given hostname or to check if a given domain is a public suffix (one under which internet users can register new names). https://bugzilla.gnome.org/show_bug.cgi?id=673802
2012-06-06tests/date: Fix compiler warningColin Walters1-2/+2
2012-05-27proxy-test: unskip accidentally skipped testsDan Winship1-1/+0
2012-05-24Fix the handling of trailing junk with Content-EncodingDan Winship1-32/+271
When a content-encoded response has trailing junk, SoupConverterWrapper needs to make sure that all of that junk gets read before returning G_CONVERTER_FINISHED, or else it will end up becoming the start of the next response on that connection. coding-test wasn't hitting this, because the trailing junk was always small enough that it would have been read into GConverterInputStream's internal buffer already at the point when the GZlibDecompresser returned FINISHED. Switching coding-test to use chunked encoding caused it to reliably hit the bug though, because the final 0-length chunk (including its header) will always still be unread at that point. So update it to use that. Also add a SoupRequest-based test to coding-test, though it turns out to not have been relevant to this bug, which affected the SoupMessage API too. https://bugzilla.gnome.org/show_bug.cgi?id=676477
2012-05-15Correctly handle unsuccessful CONNECTs via request APIDan Winship1-59/+76
and add tests to proxy-test to make sure that the request API works for each case as well (based on a patch from Sergio) https://bugzilla.gnome.org/show_bug.cgi?id=675865
2012-05-15Test caseSergio Villar Senin1-1/+95
https://bugzilla.gnome.org/show_bug.cgi?id=675865
2012-05-15soup-message-io: keep cancellable alive for duration of io_run_untilDan Winship1-1/+17
io_run() passes io->cancellable to io_run_until(), but io may be destroyed (and cancellable unreffed) before io_run_until() returns, causing it to eventually call g_cancellable_is_cancelled() on garbage. Fix by reffing it around the io_run_until() call (though really this is just another example of "SoupMessageIOData needs to be refcounted".) Tweak misc-test to test this case. Fixes crasher in rygel test case. Based on a patch from Ray Strode. https://bugzilla.gnome.org/show_bug.cgi?id=676038
2012-05-03Fix a few recent request API bugs, add some more testsDan Winship1-3/+359
2012-05-02requester-test: add an early-cancellation testDan Winship1-44/+144
2012-04-28tests/get: use GProxyResolverDefaultDan Winship1-15/+2
2012-04-17tests: add some more SoupRequester-based testsDan Winship2-25/+303
Add SoupRequester-based tests to redirect-test and add SoupSessionSync-based tests to requester-test.
2012-04-17soup-message-io: use gio streams rather than SoupSocketDan Winship2-14/+13
Use the socket's input/output streams for the base I/O, and add new SoupBodyInputStream and SoupBodyOutputStream that can be created from them to handle the body of a single message (including handling chunked encoding/decoding). Update chunk-test, which was assuming that the chunk_allocator callback would never be called if the message had a 0-length body; that's no longer true.
2012-04-17Add gettext supportDan Winship1-0/+2
There were already error messages in soup-request.c and soup-requester.c marked for translation, and we'll be adding more soon.
2012-04-11soup-session: unpause messages when cancelling themDan Winship1-0/+25
Otherwise paused messages get leaked when you abort the session. https://bugzilla.gnome.org/show_bug.cgi?id=673905
2012-04-10soup-session: fix up TLS/SSL property interactionsDan Winship1-1/+160
SoupSession:ssl-use-system-ca-file was broken, in that setting it to either TRUE or FALSE would enable it. Fix that, and also fix up the documentation and property notifications around that, SoupSession:tls-database, and SoupSession:ssl-ca-file. Add a test to tests/ssl-test to verify things. https://bugzilla.gnome.org/show_bug.cgi?id=673678
2012-03-04Use G_GNUC_BEGIN_IGNORE_DEPRECATIONS (where available)Dan Winship3-0/+14
The XMLRPC API uses GValueArray, so ignore deprecation warnings about that.
2012-03-04connection-test, requester-test: test non-persistent connectionsDan Winship2-11/+143
Make sure non-persistent connections are closed by the time we finish processing the request.
2012-03-04tests: split connection-test out of misc-testDan Winship3-482/+523
2012-02-27requester-test: add some more testsDan Winship1-23/+124
Make sure that chunked encoding and failed auth work correctly
2012-02-25SoupURI: fix fallback handling of soup_uri_set_path(uri, NULL)Dan Winship1-1/+51
In the old code, if you set a URI's path to NULL and then did soup_uri_to_string(uri, FALSE), you'd get back a path of "/". Fix the new code to behave the same way (and test it). https://bugzilla.gnome.org/show_bug.cgi?id=670431
2012-02-24SoupAuthManagerNTLM: fix don't-fallback-to-Basic codeDan Winship1-42/+90
Sessions using NTLM should never fall back to using Basic auth to access a resource which advertises NTLM auth. But ntlm-test wasn't actually testing this, and it broke at some point. Fix that, and add tests to ntlm-test.
2012-02-13SoupSessionAsync: don't queue idles from dispose()Dan Winship1-0/+33
SoupSession does a soup_session_abort() from dispose(), which had the effect in SoupSessionAsync of queueing an idle (to check if new messages could be sent now that old connections had been closed). This causes problems if the session was disposed from a thread other than the one that its GMainContext is running in, which is weird, and also incompatible with some garbage-collected runtimes. So fix that. https://bugzilla.gnome.org/show_bug.cgi?id=667364