Bug 43485 - [GTK] 407 page contents prepended to desired page contents
Summary: [GTK] 407 page contents prepended to desired page contents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 08:20 PDT by Barry Scott
Modified: 2012-10-30 08:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch that fixes the 407 handling bug. (581 bytes, patch)
2010-09-08 01:55 PDT, Barry Scott
gns: review-
Details | Formatted Diff | Diff
Patch that fixes the 407 handling bug. With ChangeLog. (1.84 KB, patch)
2010-09-13 03:42 PDT, Barry Scott
mrobinson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Scott 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;
Comment 1 Sergio Villar Senin 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.
Comment 2 Barry Scott 2010-09-08 01:55:00 PDT
Created attachment 66857 [details]
Patch that fixes the 407 handling bug.
Comment 3 WebKit Review Bot 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.
Comment 4 Gustavo Noronha (kov) 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
Comment 5 Barry Scott 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.
Comment 6 Martin Robinson 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.
Comment 7 Barry Scott 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.
Comment 8 Martin Robinson 2010-10-21 16:54:05 PDT
Sergio, any comments on this issue?
Comment 9 Sergio Villar Senin 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
Comment 10 Dominik Röttsches (drott) 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?
Comment 11 Barry Scott 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.
Comment 12 Dominik Röttsches (drott) 2012-10-30 08:16:19 PDT
Barry, thanks for the quick feedback. Closing according to reporter.