<?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>13968</bug_id>
          
          <creation_ts>2007-06-01 11:52:09 -0700</creation_ts>
          <short_desc>XMLHttpRequest on data:// URLs broken</short_desc>
          <delta_ts>2016-07-12 08:10:05 -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>XML</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>109199</dup_id>
          
          <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>0</everconfirmed>
          <reporter name="Sridhar Gurivireddy">just1gb</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>tzik</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8486</commentid>
    <comment_count>0</comment_count>
    <who name="Sridhar Gurivireddy">just1gb</who>
    <bug_when>2007-06-01 11:52:09 -0700</bug_when>
    <thetext>xmlHttprequest on data:// URLs does not work in webkit nightly build

var req = new XMLHttpRequest();
 //var url = &quot;http://www.google.com&quot;;
var url = &apos;data:text/html;charset=utf-8,%3C!DOCTYPE%20HTML%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20HTML%204.0%2F%2FEN%22%3E%0D%0A%3Chtml%20lang%3D%22en%22%3E%0D%0A%3Chead%3E%3Ctitle%3EEmbedded%20Window%3C%2Ftitle%3E%3C%2Fhead%3E%0D%0A%3Cbody%3E%3Ch1%3E42%3C%2Fh1%3E%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E%0D%0A&apos;;
req.open(&apos;GET&apos;, url, true);
req.onreadystatechange = function(aEvt) {
  if( req.readyState == 4 &amp;&amp; req.status == 200) {
    var div_id = document.getElementById(&apos;xxx&apos;);
    div_id.innerHTML = req.responseText;
  }
 }
req.send(null);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8487</commentid>
    <comment_count>1</comment_count>
      <attachid>14826</attachid>
    <who name="Sridhar Gurivireddy">just1gb</who>
    <bug_when>2007-06-01 11:53:52 -0700</bug_when>
    <thetext>Created attachment 14826
HTML that does a XHR on data://URL

Add this file to a http:// server and launch in safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8497</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-06-01 13:21:39 -0700</bug_when>
    <thetext>This does not work in Firefox either, and handling of data:// URLs is not specified in draft XMLHttpRequest spec. Does this work in Internet Explorer?

I&apos;m particularly suspicious about the &quot;req.status == 200&quot; check - status is HTTP-specific, and does not apply to other protocols.

Also, what are the use cases for this? I mean, instead of loading a data:// URL, one can just use a string literal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57845</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-05 05:25:02 -0700</bug_when>
    <thetext>It seems that Opera is the only browser that supports XHR on data:// URLs, and this feature is unlikely to get into the spec. See the thread &lt;http://lists.w3.org/Archives/Public/public-webapi/2007Oct/0001.html&gt;.

Since no use cases were presented, I don&apos;t see any value in implementing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651236</commentid>
    <comment_count>4</comment_count>
    <who name="Taiju Tsuiki">tzik</who>
    <bug_when>2012-06-18 01:13:40 -0700</bug_when>
    <thetext>Could you reconsider this?
Now, Firefox and Opera supports XHR for data: URL and some APIs have interface to get content as data: URL. 
https://bugzilla.mozilla.org/show_bug.cgi?id=702820</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1210025</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-07-12 08:10:05 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 109199 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14826</attachid>
            <date>2007-06-01 11:53:52 -0700</date>
            <delta_ts>2007-06-01 11:53:52 -0700</delta_ts>
            <desc>HTML that does a XHR on data://URL</desc>
            <filename>xmlHttpRequest_data_url.html</filename>
            <type>text/html</type>
            <size>726</size>
            <attacher name="Sridhar Gurivireddy">just1gb</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8aGVhZD4NCjwvaGVhZD4NCjxib2R5Pg0KPGRpdiBuYW1lPSJ4eHgiIGlkPSJ4eHgi
PiA8L2Rpdj4NCjxzY3JpcHQ+DQoNCnZhciByZXEgPSBuZXcgWE1MSHR0cFJlcXVlc3QoKTsNCiAv
L3ZhciB1cmwgPSAiaHR0cDovL3d3dy5nb29nbGUuY29tIjsNCnZhciB1cmwgPSAnZGF0YTp0ZXh0
L2h0bWw7Y2hhcnNldD11dGYtOCwlM0MhRE9DVFlQRSUyMEhUTUwlMjBQVUJMSUMlMjAlMjItJTJG
JTJGVzNDJTJGJTJGRFREJTIwSFRNTCUyMDQuMCUyRiUyRkVOJTIyJTNFJTBEJTBBJTNDaHRtbCUy
MGxhbmclM0QlMjJlbiUyMiUzRSUwRCUwQSUzQ2hlYWQlM0UlM0N0aXRsZSUzRUVtYmVkZGVkJTIw
V2luZG93JTNDJTJGdGl0bGUlM0UlM0MlMkZoZWFkJTNFJTBEJTBBJTNDYm9keSUzRSUzQ2gxJTNF
NDIlM0MlMkZoMSUzRSUzQyUyRmJvZHklM0UlMEQlMEElM0MlMkZodG1sJTNFJTBEJTBBJzsNCnJl
cS5vcGVuKCdHRVQnLCB1cmwsIHRydWUpOw0KcmVxLm9ucmVhZHlzdGF0ZWNoYW5nZSA9IGZ1bmN0
aW9uKGFFdnQpIHsNCiAgaWYoIHJlcS5yZWFkeVN0YXRlID09IDQgJiYgcmVxLnN0YXR1cyA9PSAy
MDApIHsNCiAgICB2YXIgZGl2X2lkID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3h4eCcpOw0K
ICAgIGRpdl9pZC5pbm5lckhUTUwgPSByZXEucmVzcG9uc2VUZXh0Ow0KICB9DQogfQ0KcmVxLnNl
bmQobnVsbCk7DQoNCjwvc2NyaXB0Pg0KPC9ib2R5Pg0KPC9odG1sPg0K
</data>

          </attachment>
      

    </bug>

</bugzilla>