<?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>21424</bug_id>
          
          <creation_ts>2008-10-06 20:46:39 -0700</creation_ts>
          <short_desc>charset ignored in enctype attribute of form element</short_desc>
          <delta_ts>2010-08-30 13:12:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Andre-John Mas">andrejohn.mas</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>ayg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94329</commentid>
    <comment_count>0</comment_count>
    <who name="Andre-John Mas">andrejohn.mas</who>
    <bug_when>2008-10-06 20:46:39 -0700</bug_when>
    <thetext>If I specify the following:

&lt;form action=&quot;&quot; method=&quot;post&quot; enctype=&quot;application/x-www-form-urlencoded; charset=utf-8&quot; accept-charset=&quot;utf-8&quot;&gt;

I find what is actually sent to the HTTP server is:

content-type: application/x-www-form-urlencoded

The charset is stripped from the content-type.

As a comparative test I checked with Opera which is sending the charset. Additionally if I read RFC2616 section 3.7.1, there is provision for allowing the character set to be specified.

I am not sure whether to see this issue as a bug that needs fixing, or an enhancement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94359</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-10-07 07:55:13 -0700</bug_when>
    <thetext>What do other browsers do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94363</commentid>
    <comment_count>2</comment_count>
      <attachid>24147</attachid>
    <who name="Andre-John Mas">andrejohn.mas</who>
    <bug_when>2008-10-07 08:38:35 -0700</bug_when>
    <thetext>Created attachment 24147
Test case

Having run the test case under Windows XP:

Firefox 3: Content-Type: application/x-www-form-urlencoded 
IE 7: Content-Type: application/x-www-form-urlencoded 
Opera 9.5: Content-Type: application/x-www-form-urlencoded; charset=utf-8
Safari 3: Content-Type: application/x-www-form-urlencoded

Maybe I am just misinterpreting the RFC. Can anyone tell me what should be done? Maybe someone with ties to the w3c?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95284</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-10-14 04:51:45 -0700</bug_when>
    <thetext>I doubt there&apos;s a better answer than &quot;we should do what both IE and Firefox do&quot;. Also, I do not see anything in &lt;http://www.w3.org/TR/html401/interact/forms.html&gt; that would imply sending charset like this.

So, this just sounds like an Opera bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>271525</commentid>
    <comment_count>4</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-08-30 11:44:10 -0700</bug_when>
    <thetext>FWIW, WebKit&apos;s behavior here is correct per HTML5:

http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-enctype

Only the three literal strings &quot;application/x-www-form-urlencoded&quot;, &quot;multipart/form-data&quot;, and &quot;text/plain&quot; are allowed.  (Saw this while searching for another bug.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>271600</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-08-30 13:12:02 -0700</bug_when>
    <thetext>Resolving as INVALID per all the above.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>24147</attachid>
            <date>2008-10-07 08:38:35 -0700</date>
            <delta_ts>2008-10-07 08:38:35 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>enctype-test.html</filename>
            <type>text/html</type>
            <size>533</size>
            <attacher name="Andre-John Mas">andrejohn.mas</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIg
Imh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPg0KDQo8
aHRtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgeG1sOmxhbmc9ImVuIiA+
DQoNCjxoZWFkPg0KICAgPHRpdGxlPlRlc3QgQ2FzZTwvdGl0bGU+DQo8L2hlYWQ+DQo8Ym9keT4N
Cg0KDQoNCjxkaXY+DQo8Zm9ybSBhY3Rpb249Imh0dHA6Ly9uZXJkbGFicy5vcmcvdG9vbHMvcmVx
dWVzdF9oZWFkZXJzLnBocCIgbWV0aG9kPSJwb3N0IiBlbmN0eXBlPSJhcHBsaWNhdGlvbi94LXd3
dy1mb3JtLXVybGVuY29kZWQ7IGNoYXJzZXQ9dXRmLTgiIGFjY2VwdC1jaGFyc2V0PSJ1dGYtOCI+
DQo8cD4NCg0KPGlucHV0IHR5cGU9InRleHQiIGlkPSJkaXNwbGF5IiBuYW1lPSJhYmMiLz48YnIv
Pg0KPGlucHV0IHR5cGU9InN1Ym1pdCIgLz4NCjwvcD4NCjwvZm9ybT4NCg0KDQo8L2Rpdj4NCg0K
PC9ib2R5Pg0KDQo8L2h0bWw+DQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>