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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>14665</bug_id>
          
          <creation_ts>2011-11-01 21:29:52 +0000</creation_ts>
          <short_desc>Content-Type is not a simple header</short_desc>
          <delta_ts>2011-11-23 17:03:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsSec</product>
          <component>CORS</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>public-webappsec</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59446</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-11-01 21:29:52 +0000</bug_when>
    <thetext>Instead of treating Content-Type as a simple header it should be treated as a header that is checked irrespective of origin (whether set by author or UA).

We should also look into unknown MIME type parameters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59465</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-11-02 01:29:48 +0000</bug_when>
    <thetext>I don&apos;t understand what this means. The Content-Type header is almost alway set for POST. Does this mean all POSTs should be preflighted?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59480</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-11-02 12:54:52 +0000</bug_when>
    <thetext>It is about simple headers being only checked against headers set by authors, whereas Content-Type can also be set by the user agent (e.g. if you pass a File object to send()).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59499</commentid>
    <comment_count>3</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-11-02 16:00:10 +0000</bug_when>
    <thetext>Ah, so you&apos;re saying we should always check it&apos;s value against the whitelist. Not just when it&apos;s set through setRequestHeader or some such?

That I agree with.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60375</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-11-23 12:22:38 +0000</bug_when>
    <thetext>Having looked at this some more I think actually that in XMLHttpRequest the send() algorithm should just add Content-Type to author request headers instead. send() is effectively doing a setRequestHeader() thing there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60385</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-11-23 17:03:23 +0000</bug_when>
    <thetext>I changed XMLHttpRequest as suggested:

http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.204;r2=1.205;f=h

I also clarified CORS that Content-Type is supposed to be listed by servers even though it is sometimes a simple header:

http://dvcs.w3.org/hg/cors/rev/83bc552d856f

I think this resolves http://www.w3.org/2011/webappsec/track/actions/11 although the wording of that action is somewhat unclear.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>