<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>35227</bug_id>
          
          <creation_ts>2010-02-21 21:03:07 -0800</creation_ts>
          <short_desc>REGRESSION (51566): HTTPHeaderMap::add(const char*, const String&amp;) does not work</short_desc>
          <delta_ts>2010-02-21 22:13:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yuta Kitamura">yutak</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>jens</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>192348</commentid>
    <comment_count>0</comment_count>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2010-02-21 21:03:07 -0800</bug_when>
    <thetext>When I call HTTPHeaderMap::add(const char*, const String&amp;) (for example, headerMap.add(&quot;Field-Name&quot;, String(&quot;field value&quot;))), 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&amp;, const String&amp;), everything works as expected.

This is due to a bug in HashMapTranslatorAdapter::translate(), which does not save the mapped value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192349</commentid>
    <comment_count>1</comment_count>
      <attachid>49183</attachid>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2010-02-21 21:06:19 -0800</bug_when>
    <thetext>Created attachment 49183
HashMapTranslatorAdapter::translate() needs to set the mapped value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192350</commentid>
    <comment_count>2</comment_count>
      <attachid>49183</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-21 21:16:34 -0800</bug_when>
    <thetext>Comment on attachment 49183
HashMapTranslatorAdapter::translate() needs to set the mapped value.

Yes, this bug was introduced by &lt;http://trac.webkit.org/changeset/51566&gt;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192353</commentid>
    <comment_count>3</comment_count>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2010-02-21 21:34:19 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 49183 [details])
&gt; Yes, this bug was introduced by &lt;http://trac.webkit.org/changeset/51566&gt;.
&gt; 
&gt; How did you notice this bug? Does this have any effect on existing code, or
&gt; only on the new code you are writing? Can you construct a test case, either
&gt; manual or automated?
&gt; 
&gt; r=me

I found this bug when I was writing new code using HTTPHeaderMap. I don&apos;t know about any affected code of this bug.

To test this manually, try to call HTTPHeaderMap::add(const char*, const String&amp;) and confirm the value is stored correctly. AFAIK there&apos;s no automatic test for this bug yet. A patch I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192356</commentid>
    <comment_count>4</comment_count>
      <attachid>49183</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-02-21 22:12:58 -0800</bug_when>
    <thetext>Comment on attachment 49183
HashMapTranslatorAdapter::translate() needs to set the mapped value.

Clearing flags on attachment: 49183

Committed r55068: &lt;http://trac.webkit.org/changeset/55068&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192357</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-02-21 22:13:02 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>49183</attachid>
            <date>2010-02-21 21:06:19 -0800</date>
            <delta_ts>2010-02-21 22:12:57 -0800</delta_ts>
            <desc>HashMapTranslatorAdapter::translate() needs to set the mapped value.</desc>
            <filename>bug-35227-20100222140617.patch</filename>
            <type>text/plain</type>
            <size>1368</size>
            <attacher name="Yuta Kitamura">yutak</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZyBiL0phdmFTY3JpcHRDb3JlL0No
YW5nZUxvZwppbmRleCAzZDFhOTI1Li42YTIzOGU0IDEwMDY0NAotLS0gYS9KYXZhU2NyaXB0Q29y
ZS9DaGFuZ2VMb2cKKysrIGIvSmF2YVNjcmlwdENvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTUg
QEAKKzIwMTAtMDItMjEgIFl1dGEgS2l0YW11cmEgIDx5dXRha0BjaHJvbWl1bS5vcmc+CisKKyAg
ICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgSGFzaE1hcFRyYW5z
bGF0b3JBZGFwdGVyOjp0cmFuc2xhdGUoKSBuZWVkcyB0byBzZXQgdGhlIG1hcHBlZCB2YWx1ZS4K
KworICAgICAgICBIVFRQSGVhZGVyTWFwOjphZGQoY29uc3QgY2hhciosIGNvbnN0IFN0cmluZyYp
IGRvZXMgbm90IHdvcmsKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcu
Y2dpP2lkPTM1MjI3CisKKyAgICAgICAgKiB3dGYvSGF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