RESOLVED FIXED 111083
[BlackBerry] Set-Cookie headers received while loading is deferred should be processed immediately
https://bugs.webkit.org/show_bug.cgi?id=111083
Summary [BlackBerry] Set-Cookie headers received while loading is deferred should be ...
Joe Mason
Reported 2013-02-28 09:23:01 PST
While loading is deferred, incoming headers are buffered until loading resumes. But new requests (which need to read cookie headers) can be created, and these are expected to include the cookies from those requests. A specific scenario is when request receives a 401 response with a Set-Cookie header is received. First NetworkJob is signalled that there was an authentication failure and credentials are needed, so it opens a password dialog and defers loading until it is closed. Then the headers and data from the response arrive and are buffered. After the user closes the dialog, first the credentials are processed - meaning a followup request is created, identical to the original but with new Cookie and Authorization headers - and then loading is resumed - and now the Set-Cookie headers are processed. Since some custom auth schemes depend on setting a cookie with the 401 response and receiving it back with the followup, the cookies from the Set-Cookie headers must be added to the cookie jar before creating the followup request, even if loading is deferred due to the auth dialog.
Attachments
fix (5.15 KB, patch)
2013-02-28 09:34 PST, Joe Mason
no flags
Joe Mason
Comment 1 2013-02-28 09:34:35 PST
Yong Li
Comment 2 2013-02-28 10:29:44 PST
Comment on attachment 190740 [details] fix based on Leo's review
WebKit Review Bot
Comment 3 2013-02-28 10:55:04 PST
Comment on attachment 190740 [details] fix Clearing flags on attachment: 190740 Committed r144326: <http://trac.webkit.org/changeset/144326>
WebKit Review Bot
Comment 4 2013-02-28 10:55:08 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.