[webkit-reviews] review granted: [Bug 8099] REGRESSION: XMLHttpRequest lowercase post requests broken : [Attachment 7458] revised fix

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sun Apr 2 16:41:55 PDT 2006

Darin Adler <darin at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 8099: REGRESSION: XMLHttpRequest lowercase post requests broken

Attachment 7458: revised fix

------- Additional Comments from Darin Adler <darin at apple.com>
The number of different methods listed in XMLHttpRequest::open is great enought
that we might even want to use a HashSet. If we use CaseInsensitiveHash, we
won't even need to call upper! You can call find, then get the value out of the
hash, something like this:

    HashSet<String, CaseInsensitiveHash>::const_iterator it =
    if (it != knownMethods.end())
	m_method = *it;

The only obstacle is that currently we only have CaseInsensitiveHash defined
for StringImpl*, not String or RefPtr<StringImpl*>. But since this is only a
single global set, we could just ref the StringImpl* instances and then use a
HashSet<StringImpl*, CaseInsensitiveHash>.

I suggest the comment:

+    // Methods names are case-sensitive, but Firefox uppercases methods it

be changed to something more like:

    // Method names are case sensitive. But since Firefox uppercases method
names it knows, we'll do the same.

The code is good as-is. r=me

More information about the webkit-reviews mailing list