Bug 21957 - WebKit doesn't know how to recover from kCFErrorDomainCFNetwork: 302 very well
Summary: WebKit doesn't know how to recover from kCFErrorDomainCFNetwork: 302 very well
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-29 14:27 PDT by Matt Bishop
Modified: 2008-10-29 18:01 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Bishop 2008-10-29 14:27:51 PDT
If I visit a site that breaks the connection such that it generates a error "kCFErrorDomainCFNetwork: 302", it takes a while, sometimes never, for that site to start rendering again. A while could be days. The site itself could be working fine, as I can open the same site in Firefox and curl just fine.

The only workaround I have found is to:

1. Empty Cache
2. Delete the site.webhistory file from ~/Library/Caches/Metadata/Safari/History
3. Remove the site's Cookies in Preferences
4. Restart Safari

It may be that the last step (removing the cookies) is the deciding factor of the workaround.

I have seen this in Safari 3.1.2, GWT Hosted Mode (uses WebKit + SWT) and the latest nightly build as of this bug filing.

Searching the web finds many, many people encountering persistent kCFErrorDomainCFNetwork errors like this, so it appears to be a widespread problem.

I can generate it pretty easily if I debug GWT in Hosted mode, hit a breakpoint, then open the page I am debugging in a safari browser instance.

Interestingly, if I stand up Tomcat and replicate the path that GWT uses (http://localhost:8888/my.module.name/index.html) with a plain HTML file, Safari still shows the 302 error.
Comment 1 Mark Rowe (bdash) 2008-10-29 15:39:57 PDT
For what it's worth, error 302 in kCFErrorDomainCFNetwork is kCFErrorHTTPConnectionLost.
Comment 2 Matt Bishop 2008-10-29 16:23:57 PDT
I have narrowed the workaround down to just deleting the cookies for the website (in my case localhost/...) and restarting all instances of WebKit.  I know, doesn't make sense, but it's what I am finding.

I'm not sure what it is about the cookies I am saving. I will keep trying to narrow this down.
Comment 3 Matt Bishop 2008-10-29 18:01:35 PDT
The bug is in Tomcat, not WebKit. This WebKit issue can be closed.

FYI, I filed a bug with Tomcat: https://issues.apache.org/bugzilla/show_bug.cgi?id=46125