[Webkit-unassigned] [Bug 11051] Javascript Image.src fails to request new image when the url domain contains uppercase letters.
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Fri Sep 29 10:51:16 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=11051
------- Comment #4 from ap at nypop.com 2006-09-29 10:51 PDT -------
I can reproduce the described behavior, and I think I have an idea about what's
going on here, but I'm not sure if this is a bug. Here is the sequence of
events in case 4 (uppercase domain, return false):
1) im.src is set, causing an NSURLRequest to be immediately created.
2) The "while (e.getTime()-b.getTime()<500)" loop begins, halting WebKit.
NSURLConnection still works on a separate thread, but it cannot call back to
WebKit yet.
3) The loop ends, and NSURLConnection finally dispatches
connection:willSendRequest:redirectResponse: for the proper domain (apple.com),
asking WebKit whether it's fine to proceed with this new domain. WebKit agrees
to proceed.
4) NSURLConnection dispatches an HTTP request to apple.com (which actually
results in one more connection:willSendRequest:redirectResponse:, because
apple.com redirects to www.apple.com).
However, if the onclick handler doesn't prevent leaving the page, then the
request is cancelled after step 2, because the frame is destroyed.
Some things we could theoretically do differently:
1) I'm not sure why NSURLConnection needs to ask after it normalizes the
(case-insensitive) host name, and why this has to be done asynchronously;
2) perhaps outstanding requests shouldn't be just cancelled when destroying the
frame, and we should at least let them be sent.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list