<?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>26906</bug_id>
          
          <creation_ts>2014-09-25 21:28:31 +0000</creation_ts>
          <short_desc>Request.referrer&apos;s serialization undefined when internal request&apos;s value is &apos;client&apos;</short_desc>
          <delta_ts>2014-10-28 15:55:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Fetch</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikhil">nsm.nikhil</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>mkwst</cc>
          
          <qa_contact>sideshowbarker+fetchspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112197</commentid>
    <comment_count>0</comment_count>
    <who name="Nikhil">nsm.nikhil</who>
    <bug_when>2014-09-25 21:28:31 +0000</bug_when>
    <thetext>var r = new Request(...); // Set&apos;s internal request&apos;s referrer to client by default.
r.referrer = ?

Currently it resolves to the empty string since the request&apos;s internal URL is an empty string, but that seems like an implementation detail and the specific case should be defined in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112239</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-26 08:28:16 +0000</bug_when>
    <thetext>So it seems /client/ is what we want, so that when the fetch is done, we take the policy into account as it stands at that point. It might be somewhat weird that request&apos;s referrer returns the empty string in that case, and not when you get it in a FetchEvent in a service worker, but perhaps that is fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112246</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-26 13:35:03 +0000</bug_when>
    <thetext>Normalizing to the empty string seems somewhat confusing, since you might think the referrer will be omitted but it won&apos;t. Alternatives:

A) We set it directly to the URL associated with the global. Then when it passes through fetch it will get normalized.

B) Like A) but we normalize it directly too. (And then when fetch happens it might get normalized again.)

C) We serialize a special value &quot;about:client&quot;, that indicates this is done later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112247</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-26 13:35:25 +0000</bug_when>
    <thetext>Or D) of course, we just serialize to the empty string and don&apos;t consider it super problematic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113027</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-13 15:29:04 +0000</bug_when>
    <thetext>I think this has to be C or D, leaning towards C since it&apos;s rather trivial either way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113837</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-28 15:55:45 +0000</bug_when>
    <thetext>https://github.com/whatwg/fetch/commit/30c35ec10994d0005f45879778424e8fc7272bde</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>