RESOLVED FIXED 35227
REGRESSION (51566): HTTPHeaderMap::add(const char*, const String&) does not work
https://bugs.webkit.org/show_bug.cgi?id=35227
Summary REGRESSION (51566): HTTPHeaderMap::add(const char*, const String&) does not work
Yuta Kitamura
Reported 2010-02-21 21:03:07 PST
When I call HTTPHeaderMap::add(const char*, const String&) (for example, headerMap.add("Field-Name", String("field value"))), the field value is not recorded in the hash map, and I only get a null string by looking up the header field. When I use HTTPHeaderMap::add(const AtomicString&, const String&), everything works as expected. This is due to a bug in HashMapTranslatorAdapter::translate(), which does not save the mapped value.
Attachments
HashMapTranslatorAdapter::translate() needs to set the mapped value. (1.34 KB, patch)
2010-02-21 21:06 PST, Yuta Kitamura
no flags
Yuta Kitamura
Comment 1 2010-02-21 21:06:19 PST
Created attachment 49183 [details] HashMapTranslatorAdapter::translate() needs to set the mapped value.
Darin Adler
Comment 2 2010-02-21 21:16:34 PST
Comment on attachment 49183 [details] HashMapTranslatorAdapter::translate() needs to set the mapped value. Yes, this bug was introduced by <http://trac.webkit.org/changeset/51566>. How did you notice this bug? Does this have any effect on existing code, or only on the new code you are writing? Can you construct a test case, either manual or automated? r=me
Yuta Kitamura
Comment 3 2010-02-21 21:34:19 PST
(In reply to comment #2) > (From update of attachment 49183 [details]) > Yes, this bug was introduced by <http://trac.webkit.org/changeset/51566>. > > How did you notice this bug? Does this have any effect on existing code, or > only on the new code you are writing? Can you construct a test case, either > manual or automated? > > r=me I found this bug when I was writing new code using HTTPHeaderMap. I don't know about any affected code of this bug. To test this manually, try to call HTTPHeaderMap::add(const char*, const String&) and confirm the value is stored correctly. AFAIK there's no automatic test for this bug yet. A patch I'm writing now includes the code path that calls the above function, so this bug will be covered by the layout tests when my patch is committed.
WebKit Commit Bot
Comment 4 2010-02-21 22:12:58 PST
Comment on attachment 49183 [details] HashMapTranslatorAdapter::translate() needs to set the mapped value. Clearing flags on attachment: 49183 Committed r55068: <http://trac.webkit.org/changeset/55068>
WebKit Commit Bot
Comment 5 2010-02-21 22:13:02 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.