URLParser should parse URLs without credentials
Created attachment 286209 [details] Patch
Comment on attachment 286209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=286209&action=review > Source/WebCore/platform/URLParser.cpp:60 > + while (isC0ControlOrSpace(*c)) > ++c; From a readability standpoint, this seems dangerous - Like you'd easily walk "c" off the end. Why is this okay? > Source/WebCore/platform/URLParser.cpp:423 > + LOG(URLParser, "%d %d %d %d %d %d %d %d %d %d %d %d %s\n%d %d %d %d %d %d %d %d %d %d %d %d %s", > + a.m_isValid, a.m_protocolIsInHTTPFamily, a.m_schemeEnd, a.m_userStart, a.m_userEnd, a.m_passwordEnd, a.m_hostEnd, a.m_portEnd, a.m_pathAfterLastSlash, a.m_pathEnd, a.m_queryEnd, a.m_fragmentEnd, a.m_string.utf8().data(), > + b.m_isValid, b.m_protocolIsInHTTPFamily, b.m_schemeEnd, b.m_userStart, b.m_userEnd, b.m_passwordEnd, b.m_hostEnd, b.m_portEnd, b.m_pathAfterLastSlash, b.m_pathEnd, b.m_queryEnd, b.m_fragmentEnd, b.m_string.utf8().data()); > + Debug-only code, I know. Makes me sad anyways.
Created attachment 286236 [details] Patch
(In reply to comment #2) > Comment on attachment 286209 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=286209&action=review > > > Source/WebCore/platform/URLParser.cpp:60 > > + while (isC0ControlOrSpace(*c)) > > ++c; > > From a readability standpoint, this seems dangerous - Like you'd easily walk > "c" off the end. > > Why is this okay? This is not ok, and even though I thought it was not in the scope of this patch, I fixed it and added a test. > > > Source/WebCore/platform/URLParser.cpp:423 > > + LOG(URLParser, "%d %d %d %d %d %d %d %d %d %d %d %d %s\n%d %d %d %d %d %d %d %d %d %d %d %d %s", > > + a.m_isValid, a.m_protocolIsInHTTPFamily, a.m_schemeEnd, a.m_userStart, a.m_userEnd, a.m_passwordEnd, a.m_hostEnd, a.m_portEnd, a.m_pathAfterLastSlash, a.m_pathEnd, a.m_queryEnd, a.m_fragmentEnd, a.m_string.utf8().data(), > > + b.m_isValid, b.m_protocolIsInHTTPFamily, b.m_schemeEnd, b.m_userStart, b.m_userEnd, b.m_passwordEnd, b.m_hostEnd, b.m_portEnd, b.m_pathAfterLastSlash, b.m_pathEnd, b.m_queryEnd, b.m_fragmentEnd, b.m_string.utf8().data()); > > + > > Debug-only code, I know. Makes me sad anyways. This makes me happy. I put them each on their own line, if that makes you happier.
http://trac.webkit.org/changeset/204544