Bug 104285 - [GTK] Add authentication support to DRT and fix exposed issues in the libsoup backend
Summary: [GTK] Add authentication support to DRT and fix exposed issues in the libsoup...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords:
Depends on: 104448
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-06 12:07 PST by Martin Robinson
Modified: 2012-12-12 11:21 PST (History)
3 users (show)

See Also:


Attachments
Patch (26.21 KB, patch)
2012-12-08 11:22 PST, Martin Robinson
no flags Details | Formatted Diff | Diff
Properly handle authentication restarts in restartedCallback (30.01 KB, patch)
2012-12-08 16:42 PST, Martin Robinson
no flags Details | Formatted Diff | Diff
New patch with better comment explaining the null password issue (30.08 KB, patch)
2012-12-09 02:45 PST, Martin Robinson
gustavo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2012-12-06 12:07:33 PST
This bug covers adding authentication support to DumpRenderTree and fixing any issues in ResourceHandleSoup that this exposes.
Comment 1 Martin Robinson 2012-12-08 11:22:06 PST
Created attachment 178368 [details]
Patch
Comment 2 Martin Robinson 2012-12-08 11:24:09 PST
This also requires a bump to the libsoup version in the jhbuild modules to fix a libsoup bug. I'll handle that in a separate patch.
Comment 3 Martin Robinson 2012-12-08 16:42:04 PST
Created attachment 178386 [details]
Properly handle authentication restarts in restartedCallback
Comment 4 Dan Winship 2012-12-09 01:56:18 PST
Comment on attachment 178386 [details]
Properly handle authentication restarts in restartedCallback

View in context: https://bugs.webkit.org/attachment.cgi?id=178386&action=review

> Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp:146
> +    // soup_uri_new will convert empty usernames and passwords into null. Some parts of
> +    // soup like the SoupAuthenticationManager will only be active when both the username
> +    // and password are non-null. When we have credentials, empty usernames and passwords
> +    // should be empty strings instead of null.

This didn't sound right to me, so I added a test, and it does seem to work: http://git.gnome.org/browse/libsoup/commit/?id=66650e5

So, not sure what was failing for you.

> Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp:170
> +    // soup_uri_to_string does not insert the password into the string, so we need to create the
> +    // URI string and then reinsert any credentials that were present in the SoupURI. All tests that
> +    // use URL-embedded credentials use HTTP, so it's safe here.

you could add a soup_uri_to_string_with_password() (or something) if you want. Other people have wanted that before...

> LayoutTests/platform/gtk/TestExpectations:-879
> -# No authentication challenge handling

woooo

> LayoutTests/platform/gtk/http/tests/misc/401-alternative-content-expected.txt:-1
> -PASS

any reason we don't just print out the debug message to match the default expectation?
Comment 5 Dan Winship 2012-12-09 01:57:03 PST
(In reply to comment #4)
> > LayoutTests/platform/gtk/http/tests/misc/401-alternative-content-expected.txt:-1
> > -PASS
> 
> any reason we don't just print out the debug message to match the default expectation?

oh, oops, that's a removal not an addition
Comment 6 Martin Robinson 2012-12-09 02:45:09 PST
Created attachment 178401 [details]
New patch with better comment explaining the null password issue
Comment 7 Gustavo Noronha (kov) 2012-12-11 02:11:52 PST
Comment on attachment 178401 [details]
New patch with better comment explaining the null password issue

LGTM!
Comment 8 Martin Robinson 2012-12-12 11:21:11 PST
Committed r137487: <http://trac.webkit.org/changeset/137487>