WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
163436
Document request not updated after willSendRequest is called for a redirect
https://bugs.webkit.org/show_bug.cgi?id=163436
Summary
Document request not updated after willSendRequest is called for a redirect
Carlos Garcia Campos
Reported
2016-10-14 01:55:08 PDT
Adding unit tests for
bug #146306
in the GTK+ port I've noticed that patch for
bug #146306
still doesn't work when a request is modified by willSendRequest after a redirect. The thing is that DocumentLoader::setRequest is not called after willSendRequest is called for a redirect. The first willSendRequest happens before DocumentLoader::startLoadingMainResource, that calls setRequest, but the second one happens after DocumentLoader::redirectReceived() and then the request is never updated again.
Attachments
Patch
(11.75 KB, patch)
2016-10-14 02:02 PDT
,
Carlos Garcia Campos
mcatanzaro
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2016-10-14 02:02:32 PDT
Created
attachment 291595
[details]
Patch Added unit tests for GTK+ only, because I'm not sure it's even possible to test a server redirect with the cross-platform C API unit tests.
Michael Catanzaro
Comment 2
2016-10-14 11:15:22 PDT
(In reply to
comment #1
)
> Created
attachment 291595
[details]
> Patch > > Added unit tests for GTK+ only, because I'm not sure it's even possible to > test a server redirect with the cross-platform C API unit tests.
I think it's not currently possible, because we have no cross-platform equivalent to SoupServer.
Michael Catanzaro
Comment 3
2016-10-14 11:31:04 PDT
Comment on
attachment 291595
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=291595&action=review
Great tests.
> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:225 > + enum State { Provisional, ProvisionalAfterRedirect, Commited, Finished };
Personally, I'd still favor using enum class even in a file-private unit test class, but your call.
> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:254 > + void checkURIAtState(State state, const char* uri)
Please rename the second parameter (maybe to "path") because it's not a URI.
Carlos Garcia Campos
Comment 4
2016-10-16 01:38:08 PDT
Committed
r207388
: <
http://trac.webkit.org/changeset/207388
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug