WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 27868
http://www.ruthhuntcandy.com/
goes into infinite refresh in WebKit, works in others
https://bugs.webkit.org/show_bug.cgi?id=27868
Summary
http://www.ruthhuntcandy.com/ goes into infinite refresh in WebKit, works in ...
Brady Eidson
Reported
2009-07-30 22:43:52 PDT
http://www.ruthhuntcandy.com/
goes into infinite refresh in WebKit, works in Firefox. They have this HTML in their main resource: <META HTTP-EQUIV="Refresh" CONTENT="0; URL='
http://www.ruthhuntcandy.com/default.asp
"> The quotes are mismatched: Opens with a ' but closes with a ". parseHTTPRefresh() chokes in this case. So we can't parse the URL and default to the main page URL of
http://www.ruthhuntcandy.com/
. We do the scheduled refresh over and over, never moving on to
http://www.ruthhuntcandy.com/default.asp
This is truly a site bug, but Firefox, Opera 10, and IE6+ are all tolerant of this. In radar as <
rdar://problem/7106968
>
Attachments
Fix + Layout Test
(4.07 KB, patch)
2009-07-30 23:44 PDT
,
Brady Eidson
mrowe
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2009-07-30 22:55:02 PDT
All the other browsers handle opening with a ' but closing with a " But none of them handle opening with a " and closing with a ' This is (probably and obviously) because ' is a legal URL character, but " isn't. So we just have to plug this specific case of '-" and leave "-' unanswered.
Brady Eidson
Comment 2
2009-07-30 23:22:55 PDT
I completely missed the point here, actually. The meta-equiv is: "0; URL='
http://www.ruthhuntcandy.com/default.asp
" The opening and closing quotes are stripped in this context as a matching pair, leaving us with: 0; URL='
http://www.ruthhuntcandy.com/default.asp
The opening single quote has no closer. Thats the case we need to fix.
Brady Eidson
Comment 3
2009-07-30 23:44:29 PDT
Created
attachment 33860
[details]
Fix + Layout Test
Mark Rowe (bdash)
Comment 4
2009-07-30 23:48:47 PDT
Comment on
attachment 33860
[details]
Fix + Layout Test
> Index: WebCore/platform/network/HTTPParsers.cpp > =================================================================== > --- WebCore/platform/network/HTTPParsers.cpp (revision 46514) > +++ WebCore/platform/network/HTTPParsers.cpp (working copy) > @@ -100,6 +100,12 @@ bool parseHTTPRefresh(const String& refr > if (refresh[urlEndPos] == quotationMark) > break; > } > + > + //
https://bugs.webkit.org/show_bug.cgi?id=27868
> + // Sometimes there is no closing quote for the end of the URL even though there was an opening quote. > + // All of the other browsers handle this case. > + if (urlEndPos == urlStartPos) > + urlEndPos = len; > }
The comment could be a little clearer about what it is we do to handle the stray quote (eg, skip over it). I had to read back up in the code to work out how this code related to the quote at all. r=me
Brady Eidson
Comment 5
2009-07-30 23:54:50 PDT
Sending LayoutTests/ChangeLog Adding LayoutTests/http/tests/misc/meta-refresh-stray-single-quote-expected.txt Adding LayoutTests/http/tests/misc/meta-refresh-stray-single-quote.html Adding LayoutTests/http/tests/misc/resources/success-notify-done.html Sending WebCore/ChangeLog Sending WebCore/platform/network/HTTPParsers.cpp Transmitting file data ...... Committed revision 46624.
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