Warn if the user tries to load a URI containing a fragment.
authorDan Winship <danw@gnome.org>
Wed, 26 Aug 2009 15:09:34 +0000 (11:09 -0400)
committerDan Winship <danw@gnome.org>
Thu, 17 Dec 2009 15:45:12 +0000 (16:45 +0100)
commit19cc4d0c0956ec92f06a0a3a746ad0434e47bc9c
tree8e063934930927a30b2067acd667aaa2fb0dc177
parentafd537f6ca0a985b3fa588c0b4aab1062de24285
Warn if the user tries to load a URI containing a fragment.

Previously fragments were silently ignored when doing direct HTTP, but
were passed to the proxy when using a proxy (which would sometimes
cause the request to fail, depending on the server configuration).
Since fragments are not meaningful at the HTTP level, callers should
not be passing URIs with fragments to SoupMessage, so warn if they do,
and then consistently ignore the fragment after that.

Also update SoupSession to fix up fragments in Location headers so
that SoupMessage won't warn about them (since that's the server's
fault, not the caller's), and add a test to redirect-test for that.

See also https://bugs.webkit.org/show_bug.cgi?id=28687 for some
additional discussion.
libsoup/soup-message.c
libsoup/soup-session.c
tests/redirect-test.c