Bug 23798

Summary: KURLGoogle needs support for protocolInHTTPFamily
Product: WebKit Reporter: David Levin <levin>
Component: PlatformAssignee: David Levin <levin>
Status: RESOLVED FIXED    
Severity: Normal CC: levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch for bug.
eric: review-
Patch for bug.
none
Patch for bug. eric: review+

Description David Levin 2009-02-06 12:45:34 PST
This was added to KURL.h in http://trac.webkit.org/changeset/40553
Comment 1 David Levin 2009-02-06 13:03:05 PST
Created attachment 27410 [details]
Patch for bug.
Comment 2 Eric Seidel (no email) 2009-02-06 13:37:39 PST
Comment on attachment 27410 [details]
Patch for bug.

A comment make it easier to understand what lowerCaseEqualsASCII is doing.  Especially in the last return.

// The last char of str should be NULL if we reached the end
or similar.

It seems initProtocolInHTTPFamily should use:

m_protocolInHTTPFamiy = m_isValid
&& (m_parsed.scheme.len == 4 && lowerCaseEqualsASCII(m_utf8.data(), m_utf8.data() + 4, "http") || ...

That would be much shorter. :)

Also, we should probably fix query_encoding to match WebKIt naming conventions while we're here.

Otherwise looks fine.
Comment 3 David Levin 2009-02-06 14:38:39 PST
Created attachment 27420 [details]
Patch for bug.

I change the fixes slightly in response to your comments and added a comment as suggested.

Also, since you suggested fixing a casingIssue, I did this throughout the file and fixed a few other style issues in the file.
Comment 4 David Levin 2009-02-06 15:06:57 PST
Created attachment 27421 [details]
Patch for bug.
Comment 5 Eric Seidel (no email) 2009-02-06 15:16:51 PST
Comment on attachment 27421 [details]
Patch for bug.

r=me
Comment 6 Eric Seidel (no email) 2009-02-06 15:25:45 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/platform/KURL.h
	M	WebCore/platform/KURLGoogle.cpp
	M	WebCore/platform/KURLGooglePrivate.h
Committed r40735