RESOLVED FIXED Bug 24602
[Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
https://bugs.webkit.org/show_bug.cgi?id=24602
Summary [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
Gustavo Noronha (kov)
Reported 2009-03-14 16:02:31 PDT
This is caused by the fact that thepiratebay's search responds with a redirect to an URI containing whatever was searched, but doesn't properly encode the URI, so you get something like this: HTTP/1.1 302 Found Soup-Debug-Timestamp: 1237071670 Soup-Debug: SoupMessage 7 (0xa159f10) Set-Cookie: searchTitle=0; expires=Sun, 14-Mar-2010 23:01:19 GMT; path=/ Location: /search/foo bar/0/99/0 Content-Type: text/html Content-Length: 0 Date: Sat, 14 Mar 2009 23:01:19 GMT Server: lighttpd libsoup currently uses the URI with no processing to make sure it's valid, and gets a 400 Bad Request.
Attachments
proposed fix (2.62 KB, patch)
2009-03-14 16:07 PDT, Gustavo Noronha (kov)
no flags
proposed fix (2.72 KB, patch)
2009-03-15 06:57 PDT, Gustavo Noronha (kov)
andersca: review+
webkit-bug-24602-drop-workaround.patch (69 bytes, text/plain)
2009-07-21 05:08 PDT, Priit Laes (IRC: plaes)
no flags
webkit-bug-24602-drop-workaround.patch (2.30 KB, patch)
2009-07-21 05:11 PDT, Priit Laes (IRC: plaes)
gustavo: review+
Gustavo Noronha (kov)
Comment 1 2009-03-14 16:07:04 PDT
Created attachment 28631 [details] proposed fix
Xan Lopez
Comment 2 2009-03-14 23:53:43 PDT
(In reply to comment #1) > Created an attachment (id=28631) [review] > proposed fix > + SoupURI* soup_uri = soup_uri_new(newURL.string().utf8().data()); + soup_message_set_uri(msg, soup_uri); + You are leaking the new URI, need to call soup_uri_free on it.
Gustavo Noronha (kov)
Comment 3 2009-03-15 06:57:01 PDT
Created attachment 28634 [details] proposed fix Yep, Xan's write =).
Anders Carlsson
Comment 4 2009-03-15 10:14:52 PDT
Comment on attachment 28634 [details] proposed fix r=me
Gustavo Noronha (kov)
Comment 5 2009-03-15 10:41:49 PDT
Landed as r41719.
Gustavo Noronha (kov)
Comment 6 2009-03-15 10:43:44 PDT
(In reply to comment #3) > Created an attachment (id=28634) [review] > proposed fix > > Yep, Xan's write =). > right is what I meant, of course... /me hits his head against the wall =)
Priit Laes (IRC: plaes)
Comment 7 2009-07-21 05:08:58 PDT
Created attachment 33171 [details] webkit-bug-24602-drop-workaround.patch Drop workaround required for <=libsoup-2.26.2
Priit Laes (IRC: plaes)
Comment 8 2009-07-21 05:11:08 PDT
Created attachment 33172 [details] webkit-bug-24602-drop-workaround.patch
Gustavo Noronha (kov)
Comment 9 2009-07-21 10:07:08 PDT
Comment on attachment 33172 [details] webkit-bug-24602-drop-workaround.patch looks good r=me
Gustavo Noronha (kov)
Comment 10 2009-07-21 10:14:55 PDT
Comment on attachment 33172 [details] webkit-bug-24602-drop-workaround.patch Landed as r46178.
Gustavo Noronha (kov)
Comment 11 2009-07-21 10:15:59 PDT
Comment on attachment 33172 [details] webkit-bug-24602-drop-workaround.patch Landed as r46178.
Note You need to log in before you can comment on or make changes to this bug.