<?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>156125</bug_id>
          
          <creation_ts>2016-04-01 19:16:13 -0700</creation_ts>
          <short_desc>Fetching blob URLs with query parameters results in 404</short_desc>
          <delta_ts>2022-05-31 09:56:22 -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>Page Loading</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.11</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="Nolan Lawson">nolan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>mek</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1180010</commentid>
    <comment_count>0</comment_count>
      <attachid>275457</attachid>
    <who name="Nolan Lawson">nolan</who>
    <bug_when>2016-04-01 19:16:13 -0700</bug_when>
    <thetext>Created attachment 275457
Reproducible test case

Steps to repro:

1. Create a Blob
2. Create an object URL
3. Append a query param
4. Fetch it

Expected:

The Blob should be fetched normally, regardless of whether or not there are query params.

Actual:

The fetch resulted in a 404.

Notes:

There&apos;s no 404 in Firefox, but there is in Chrome.

URL to repro: http://bl.ocks.org/nolanlawson/2d6cdd75df91b04c49706e9abe2222a7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1180011</commentid>
    <comment_count>1</comment_count>
    <who name="Nolan Lawson">nolan</who>
    <bug_when>2016-04-01 19:17:27 -0700</bug_when>
    <thetext>Equivalent issue in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=600074</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1180017</commentid>
    <comment_count>2</comment_count>
    <who name="Nolan Lawson">nolan</who>
    <bug_when>2016-04-01 19:59:30 -0700</bug_when>
    <thetext>FWIW Edge throws an &quot;Invalid argument&quot; exception if you append a query string to a blob URL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1180034</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-01 22:30:16 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Created attachment 275457 [details]
&gt; Reproducible test case
&gt; 
&gt; Steps to repro:
&gt; 
&gt; 1. Create a Blob
&gt; 2. Create an object URL
&gt; 3. Append a query param
&gt; 4. Fetch it
&gt; 
&gt; Expected:
&gt; 
&gt; The Blob should be fetched normally, regardless of whether or not there are
&gt; query params.

This is not actually a forgone conclusion.

There&apos;s a relevant spec here - https://www.w3.org/TR/FileAPI/#DefinitionOfScheme - that defines what a valid blob url is.

A blob URL *MUST* consist of:
- The blob: scheme
- String representing the origin of the blob
- The character &quot;/&quot;
- String that is a UUID.

A blob URL *MAY* consist of:
- An optional fragment identifier

The language here is very short. If it&apos;s not in a &quot;must&quot; or a &quot;may&quot; section, one can extrapolate that it&apos;s a &quot;must not&quot;.

&gt; There&apos;s no 404 in Firefox, but there is in Chrome.

It seems like Firefox might get this wrong.

&gt; FWIW Edge throws an &quot;Invalid argument&quot; exception if you append a query string to a blob URL.

It seems like Edge gets this &quot;the most right&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1180052</commentid>
    <comment_count>4</comment_count>
    <who name="Nolan Lawson">nolan</who>
    <bug_when>2016-04-02 07:53:49 -0700</bug_when>
    <thetext>Good point - the spec seems to leave this open for interpretation. Although I filed this issue based on principle of least surprise; I assumed query parameters would just be ignored.

Waiting to hear back from Chromium devs, but happy to file a bug on Firefox if there&apos;s a consensus on the interpretation. It&apos;s also pretty easy for web authors to work around, so not a very severe bug anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1378590</commentid>
    <comment_count>5</comment_count>
    <who name="Marijn Kruisselbrink">mek</who>
    <bug_when>2017-12-06 06:28:48 -0800</bug_when>
    <thetext>FWIW in https://github.com/w3c/FileAPI/pull/92 I&apos;m working on making the spec a lot more explicit around Blob URL behavior, and currently I&apos;m leaning towards making the webkit/blink/edge behavior the expected behavior; i.e. making fetching blob URLs with query parameters a network error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872774</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-05-30 09:35:32 -0700</bug_when>
    <thetext>This bug should be closed since the spec change led to behavior being default to Webkit behavior, which was consistent across all browsers except Firefox. Please refer to http://crbug.com/600074 for further details.


Please mark this as &quot;Resolved Invalid&quot; or &quot;WON&apos;TFIX&quot;. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872999</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-05-31 09:56:22 -0700</bug_when>
    <thetext>Thank you for checking!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>275457</attachid>
            <date>2016-04-01 19:16:13 -0700</date>
            <delta_ts>2016-04-01 19:16:13 -0700</delta_ts>
            <desc>Reproducible test case</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>645</size>
            <attacher name="Nolan Lawson">nolan</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5Pgo8aDE+UmVwcm8gYmxvYiB3aXRoIHF1ZXJ5IHBhcmFtcyBidWc8L2gxPgo8
cD5JZiB5b3Ugc2VlIDxzdHJvbmc+NDA0PC9zdHJvbmc+IGJlbG93LCB0aGVuIHRoZSBidWcgaXMg
cHJlc2VudC48L3A+CjxwcmUgaWQ9ImRpc3BsYXkiPjwvcHJlPgo8c2NyaXB0PgooZnVuY3Rpb24g
KCkgewp2YXIgZGlzcGxheSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdkaXNwbGF5Jyk7CnZh
ciBibG9iID0gbmV3IEJsb2IoWydoZWxsbyddLCB7dHlwZTogJ3RleHQvcGxhaW4nfSk7CnZhciB1
cmwgPSBVUkwuY3JlYXRlT2JqZWN0VVJMKGJsb2IpICsgJz9xPXgnOwp2YXIgeGhyID0gbmV3IFhN
TEh0dHBSZXF1ZXN0KCk7Cnhoci5vbmxvYWQgPSBmdW5jdGlvbiAoKSB7CiAgdmFyIGJvZHkgPSB4
aHIucmVzcG9uc2U7CiAgZGlzcGxheS5pbm5lckhUTUwgKz0gJ3VybDogJyArIHVybCArCiAgICAn
XG5zdGF0dXM6ICcgKyB4aHIuc3RhdHVzICsKICAgICdcbnR5cGU6ICcgKyBib2R5LnR5cGUgKwog
ICAgJ1xuc2l6ZTogJyArIGJvZHkuc2l6ZTsKfTsKeGhyLnJlc3BvbnNlVHlwZSA9ICdibG9iJzsK
eGhyLm9wZW4oJ0dFVCcsIHVybCArICc/cT14Jyk7Cnhoci5zZW5kKCk7Cn0pKCk7Cjwvc2NyaXB0
Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>