Bug 102436 - [BlackBerry] Fix assert in NetworkJob::notifyAuthReceived
Summary: [BlackBerry] Fix assert in NetworkJob::notifyAuthReceived
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-15 14:46 PST by Joe Mason
Modified: 2012-11-15 16:24 PST (History)
4 users (show)

See Also:


Attachments
fix (3.58 KB, patch)
2012-11-15 14:51 PST, Joe Mason
no flags Details | Formatted Diff | Diff
fix (3.58 KB, patch)
2012-11-15 14:53 PST, Joe Mason
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Mason 2012-11-15 14:46:55 PST
// The scheme might have changed, but the server type shouldn't have!
BLACKBERRY_ASSERT(serverType == oldSpace.serverType());

That comment is wrong - the server type could change if we contact a site taking HTTP auth, through an HTTP proxy taking auth of its own. First we get a 407 from the proxy, and then when get passed the proxy, we get a 401 from the end site - so notifyAuthReceived gets called again with auth type Proxy instead of HTTP.

The correct thing to do when that happens is skip the "update the auth type in the credentials" step, since these are actually new credentials and not just credentials being reused for a different auth type on the same server.
Comment 1 Joe Mason 2012-11-15 14:51:44 PST
Created attachment 174524 [details]
fix
Comment 2 Joe Mason 2012-11-15 14:53:08 PST
Created attachment 174526 [details]
fix

first pathc had a typo
Comment 3 Rob Buis 2012-11-15 15:24:30 PST
Comment on attachment 174526 [details]
fix

LGTM.
Comment 4 WebKit Review Bot 2012-11-15 16:24:04 PST
Comment on attachment 174526 [details]
fix

Clearing flags on attachment: 174526

Committed r134853: <http://trac.webkit.org/changeset/134853>
Comment 5 WebKit Review Bot 2012-11-15 16:24:08 PST
All reviewed patches have been landed.  Closing bug.