Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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.
|
|
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
|
|
When receiving an HTTP/1.0 message with no Host header on an IPv6
interface, SoupServer would internally generate an invalid URL and
then return 400 Bad Request. Fix, and add a test for it.
https://bugzilla.gnome.org/show_bug.cgi?id=666399
|
|
|
|
Although it has always been documented that a SoupURI must have a
non-NULL path, nothing ever enforced this, and most methods checked
whether it was NULL before looking at it anyway. So lots of existing
code was getting this wrong, and is now breaking because of the
"g_return_if_fail (SOUP_URI_IS_VALID (uri))" checks.
So, change most of those to just g_warn_if_fail() (while adding back
the old return-if-fail !NULL checks), but also fix soup_uri_set_path()
and soup_uri_new_with_base() to handle NULL paths more sanely (after
warning). Also, allow calling the getters on invalid URIs.
Add a new test to uri-testing to make sure that URIs created with
soup_uri_new(NULL) behave as expected at each step of the way...
https://bugzilla.gnome.org/show_bug.cgi?id=667637
|
|
[This would only happen if a request was made to an unhandled path,
which this test doesn't do, but it seems reasonable to return an empty
response rather than crashing. -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
|
|
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
|
|
This was suspected to cause a crash via a NULL path; while it seems it
doesn't actually have that problem, it still seems worth testing.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
|
Testing the round-trip (split + reassemble) is necessary, but not
sufficient: a large proportion of SoupURI's API is in terms of the
separate parts, and this was never explicitly tested before.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
|
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
|
|
Make sure that content-sniffing and redirections work
|
|
(This was already working, but not tested, on master, but it was
broken on a work branch.)
|
|
soup_session_cancel_message() may have been called in a REQUEST_STARTED
callback, so it is safer to make sure that
soup_connection_send_request() is called only if that is not the case.
https://bugzilla.gnome.org/show_bug.cgi?id=668098
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=667635
|
|
Add a new SOUP_MESSAGE_NEW_CONNECTION flag, and insist on getting a
brand new SoupConnection for any message that has that flag set, or
that uses a non-idempotent method.
Add a test to misc-test for this.
https://bugzilla.gnome.org/show_bug.cgi?id=578990
|
|
Return an error if the headers start with '\0', ignore header lines
with zero-length header names, and convert excess CRs to spaces. All
of these could possibly occur in received headers, and were previously
hitting g_return_if_fails().
Add a bunch of test cases to header-tests to test these cases (and
some others that we already handled correctly but weren't testing).
Fix the documentation of @str on soup_headers_parse* to reflect
reality.
Based on a patch from Simon McVittie.
https://bugzilla.gnome.org/show_bug.cgi?id=666316
|
|
and add a test to misc-test
|
|
misc-test would crash if it ran long enough (due to either stopping in
gdb or just adding enough new tests to the end) because of a bug in the
max_conns_test cleanup code.
|
|
|
|
It was accidentally getting cleared at the wrong time (although the
tls-certificate and tls-errors properties were still correct).
Also add a test for this case.
https://bugzilla.gnome.org/show_bug.cgi?id=665182
|
|
|
|
Refactored the original code. A couple of utility functions perform now all
the checks.
Content compressed with deflate algorithm (with or without zlib headers) is
also supported and checked.
|
|
|
|
Switch to using the Unicode-encoded form of NTLM, so that non-ASCII
usernames/passwords will work.
Also, add a "-n" option to tests/get to make it use NTLM, and make
SoupAuthManagerNTLM allow passwords-in-URLs.
Based on a patch from Joachim Breitner, sponsored by ITOMIG GmbH and
the City of Böblingen.
https://bugzilla.gnome.org/show_bug.cgi?id=576838
|
|
|
|
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=662806
|
|
Add a SoupSession flag telling it to use
g_main_context_get_thread_default() on a per-message basis, rather
than using a single GMainContext for everything. In the simple case,
this is just more glib-like API. In the more complicated case, it
allows synchronously sending one or more messages on a
SoupSessionAsync without running the main GMainLoop.
https://bugs.webkit.org/show_bug.cgi?id=68238
|
|
|
|
|
|
|
|
|
|
In particular, make sure it gets set when a connection fails, so that
soup_message_get_https_status() on the message will tell you *why* it
failed.
Also, update tests/get to display the tls-certificate-errors
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=651146
|
|
|
|
|
|
Update the test ssl key to specify "CN=127.0.0.1", so we don't get
G_TLS_CERTIFICATE_BAD_IDENTITY from it
|
|
|
|
Long ago, soup_message_body_set_accumulate() was made into a no-op on
request bodies, because otherwise there would be no body available to
send if the request was restarted. Add a SOUP_MESSAGE_CAN_REBUILD
flag, that indicates that the caller takes responsibility for handling
this, and properly discard chunks if that is set.
Also update chunk-test to test this, and (finally!) remove the FIXME
there, since we are now testing the !accumulate codepath again
properly.
https://bugzilla.gnome.org/show_bug.cgi?id=656650
|
|
|
|
This brings the content sniffing algorithm closer to the HTML5
specification.
https://bugzilla.gnome.org/show_bug.cgi?id=648846
|
|
When a message got restarted, we were leaving the previous response
state in the message, which is bad for various reasons.
In particular, this caused a problem with non-keepalive redirections
of https URLs through proxies (!), because after the second CONNECT
succeeded, it would see that the message already had a status_code
set, and so it thought the message had been cancelled or something
while it was processing the CONNECT. proxy-test now has a regression
test for this case.
Based on patches and analysis from DongJae Kim and Thierry Reding.
https://bugzilla.gnome.org/show_bug.cgi?id=631368
|
|
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
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=651643
|
|
When sending a .gz file, Apache will (by default) incorrectly claim
"Content-Encoding: gzip", causing us to do the wrong thing with it.
Work around this bug in the same way Firefox does.
https://bugzilla.gnome.org/show_bug.cgi?id=613361
|
|
|
|
|