<?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>16841</bug_id>
          
          <creation_ts>2012-04-24 17:52:20 +0000</creation_ts>
          <short_desc>Expected use of Origin HTTP header</short_desc>
          <delta_ts>2012-10-15 23:54:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</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="Patrick Ladd">Pat_Ladd2</reporter>
          <assigned_to name="Silvia Pfeiffer">silviapfeiffer1</assigned_to>
          <cc>annevk</cc>
    
    <cc>b.lund</cc>
    
    <cc>cmhjones</cc>
    
    <cc>eoconnor</cc>
    
    <cc>mark_vickers</cc>
    
    <cc>mike</cc>
    
    <cc>odinho</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66986</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-04-24 17:52:20 +0000</bug_when>
    <thetext>Section 2.7.6 &quot;CORS-enabled fetch&quot; executes the CORS &quot;resource sharing check&quot; which fails if the server did not include an Access-Control-Allow-Origin header in the response to the request.  This implies that if the user agent did not send an Origin header the resource sharing check will fail and cause the potentially CORS-enabled fetch to taint or fail depending on the mode.  In order to clarify the expectation, one possible solution is a statement describing what happens when the Origin header is not sent by the user agent.  For example, add a sentence at the end of the first paragraph in section 2.7.6 that states, &quot;If the user agent did not include an Origin header in the request, then the result of the potentially CORS-enabled fetch is success as defined for URL has the same origin as origin.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66989</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-04-24 20:23:48 +0000</bug_when>
    <thetext>The expectation would be that it is tainted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66991</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-04-24 20:35:55 +0000</bug_when>
    <thetext>Are you saying a clarification isn&apos;t needed or the recommended statement should indicate taint rather than success?

&gt; The expectation would be that it is tainted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66992</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-04-24 20:39:41 +0000</bug_when>
    <thetext>Clarification might be nice, although user agents that do not implement CORS seem somewhat broken to me, but you can definitely never get more sharing without CORS than with. It should be either tainted or result in failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67114</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Vickers">mark_vickers</who>
    <bug_when>2012-04-26 19:22:03 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Clarification might be nice, although user agents that do not implement CORS
&gt; seem somewhat broken to me,

So, why don&apos;t we require CORS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67474</commentid>
    <comment_count>5</comment_count>
    <who name="Odin Hørthe Omdal">odinho</who>
    <bug_when>2012-05-08 12:47:45 +0000</bug_when>
    <thetext>Hmm. What are you more specifically asking about? The user agent always sends a Origin-header if it&apos;s doing a CORS-enabled fetch.

http://dev.w3.org/html5/spec/urls.html#cors-enabled-fetch

So e.g. &lt;img src=cross&gt; will always show you the picture, but it&apos;ll be tainted because that&apos;s the default - AFAIK it won&apos;t send a origin-header because you it&apos;s mode is &quot;No CORS&quot;.

&lt;img src=cross crossorigin&gt;, however, will take a different branch and do a real cross-fetch (either success or fail).

&lt;img src=same crossorigin&gt; will go into the first branch, but will restart the algorithm if it&apos;s redirected to cross.


So all real cross-domain uses should be sending an Origin-header, AFAICS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67590</commentid>
    <comment_count>6</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-05-10 23:40:33 +0000</bug_when>
    <thetext>The user agent may always send an Origin header when doing a CORS-enabled fetch, but I don&apos;t see where the CORS or HTML5 specifications mandate use of that header.  I thought there might be reluctance to add such a requirement so the initial proposal was to clarify what happens when the user agent does not send an Origin header.  I&apos;m hopeful the editors will acknowledge that lack of clarity and either accept or make counter proposals to the suggestions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70157</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 07:01:25 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17843 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75152</commentid>
    <comment_count>8</comment_count>
    <who name="Edward O&apos;Connor">eoconnor</who>
    <bug_when>2012-10-02 23:27:33 +0000</bug_when>
    <thetext>Silvia, this has been fixed in WHATWG revision r7414.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75720</commentid>
    <comment_count>9</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-10-09 19:14:37 +0000</bug_when>
    <thetext>Fixed by the resolution for bug 17843.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75740</commentid>
    <comment_count>10</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-10-09 22:43:01 +0000</bug_when>
    <thetext>Fixed by the resolution for bug 17843.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75745</commentid>
    <comment_count>11</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-10-09 22:52:43 +0000</bug_when>
    <thetext>Jumped the gun, needs to be fixed in HTML5 as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76241</commentid>
    <comment_count>12</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-10-14 12:33:11 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
document:   http://dev.w3.org/html5/decision-policy/decision-policy-v2.html

Status: Accepted
Change Description:
https://github.com/w3c/html/commit/f43ac3f0bce8b57f8f7c8891de4093296c049852
Rationale: accepted WHATWG change</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76346</commentid>
    <comment_count>13</comment_count>
    <who name="Patrick Ladd">Pat_Ladd2</who>
    <bug_when>2012-10-15 23:54:58 +0000</bug_when>
    <thetext>Verified changes made to WHATWG HTML Living Standard for this issue also made in W3C HTML5 specification.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>