Bug 43485

Summary: [GTK] 407 page contents prepended to desired page contents
Product: WebKit Reporter: Barry Scott <barry.scott>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: d-r, mrobinson, svillar, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch that fixes the 407 handling bug.
gustavo: review-
Patch that fixes the 407 handling bug. With ChangeLog. mrobinson: review-

Barry Scott
Reported 2010-08-04 08:20:53 PDT
To the SoupSeesion add an implementation of SoupProxyURIResolver. When the first request goes through the body of the 407 response is combined with the desired pages body. The 2nd and subsequent load_url() calls to webkit work as expect (SoupLogger shows that the ProxyAuth head is always sent). The following patch suggested by danw fixed the problem. --- WebCore/platform/network/soup/ResourceHandleSoup.cpp~ 2010-08-04 15:08:43.364294079 +0100 +++ WebCore/platform/network/soup/ResourceHandleSoup.cpp 2010-08-04 15:08:43.365413474 +0100 @@ -153,7 +153,8 @@ { if (SOUP_STATUS_IS_TRANSPORT_ERROR(statusCode) || (SOUP_STATUS_IS_REDIRECTION(statusCode) && (statusCode != SOUP_STATUS_NOT_MODIFIED)) - || (statusCode == SOUP_STATUS_UNAUTHORIZED)) + || (statusCode == SOUP_STATUS_UNAUTHORIZED) + || (statusCode == SOUP_STATUS_PROXY_UNAUTHORIZED)) return true; return false;
Attachments
Patch that fixes the 407 handling bug. (581 bytes, patch)
2010-09-08 01:55 PDT, Barry Scott
gustavo: review-
Patch that fixes the 407 handling bug. With ChangeLog. (1.84 KB, patch)
2010-09-13 03:42 PDT, Barry Scott
mrobinson: review-
Sergio Villar Senin
Comment 1 2010-09-07 07:28:40 PDT
Barry could you please add the patch as an attachment setting the review flag to '?' That way a WebKit reviewer could take a look and approve it.
Barry Scott
Comment 2 2010-09-08 01:55:00 PDT
Created attachment 66857 [details] Patch that fixes the 407 handling bug.
WebKit Review Bot
Comment 3 2010-09-08 01:58:04 PDT
Attachment 66857 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 Total errors found: 0 in 0 files If any of these errors are false positives, please file a bug against check-webkit-style.
Gustavo Noronha (kov)
Comment 4 2010-09-13 01:52:17 PDT
Comment on attachment 66857 [details] Patch that fixes the 407 handling bug. This looks right to me, but the patche needs a ChangeLog entry as well, could you please add it? There's some information on how here: http://webkit.org/coding/contributing.html
Barry Scott
Comment 5 2010-09-13 03:42:44 PDT
Created attachment 67392 [details] Patch that fixes the 407 handling bug. With ChangeLog. Hopefully this is what you need.
Martin Robinson
Comment 6 2010-09-15 11:51:02 PDT
Comment on attachment 67392 [details] Patch that fixes the 407 handling bug. With ChangeLog. View in context: https://bugs.webkit.org/attachment.cgi?id=67392&action=prettypatch Great change, but if this can be tested it should have tests. > WebCore/ChangeLog:19 > + No new tests. (OOPS!) There should either be tests for this patch or an explanation here of why this cannot be tested.
Barry Scott
Comment 7 2010-09-16 02:54:29 PDT
Explanation no tests: I have no idea what your test framework requires. I have no time to learn about this and develop a test to your standards.
Martin Robinson
Comment 8 2010-10-21 16:54:05 PDT
Sergio, any comments on this issue?
Sergio Villar Senin
Comment 9 2010-10-22 00:48:46 PDT
(In reply to comment #8) > Sergio, any comments on this issue? I would try to complete the patch with a proper test
Dominik Röttsches (drott)
Comment 10 2012-10-30 06:21:09 PDT
(In reply to comment #0) > To the SoupSeesion add an implementation of SoupProxyURIResolver. > When the first request goes through the body of the 407 response > is combined with the desired pages body. > > The 2nd and subsequent load_url() calls to webkit work as expect > (SoupLogger shows that the ProxyAuth head is always sent). > > The following patch suggested by danw fixed the problem. Barry, can you still reproduce this issue? How did you find the bug? What are the reproduction steps?
Barry Scott
Comment 11 2012-10-30 08:14:32 PDT
(In reply to comment #10) > (In reply to comment #0) > > To the SoupSeesion add an implementation of SoupProxyURIResolver. > > When the first request goes through the body of the 407 response > > is combined with the desired pages body. > > > > The 2nd and subsequent load_url() calls to webkit work as expect > > (SoupLogger shows that the ProxyAuth head is always sent). > > > > The following patch suggested by danw fixed the problem. > > Barry, can you still reproduce this issue? > > How did you find the bug? What are the reproduction steps? I think you need to test against a proxy that is password protected. We test with "no auth", "basic" and "digest" in all combinations for the web page and the proxy. e.g. 9 tests. In the ones where the proxy needs authenticated the page output is corrupted. You have rewritten the Soup code in this area for current webkitgtk so that this patch is not needed and the bug is no longer present.
Dominik Röttsches (drott)
Comment 12 2012-10-30 08:16:19 PDT
Barry, thanks for the quick feedback. Closing according to reporter.
Note You need to log in before you can comment on or make changes to this bug.