Issue metadata
Sign in to add a comment
|
file:// uri's detected as "Cross origin requests" with XHR, even when requesting itself.
Reported by
divinit...@gmail.com,
Dec 11 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Steps to reproduce the problem:
1.
make a file called test.html in your home folder containing:
<script>
(function(){
"use strict";
var xhr=new XMLHttpRequest();
xhr.open("GET","test.html");
xhr.addEventListener("readystatechange",function(ev){
var xhr=ev.target;
console.log(xhr.readyState);
console.log(xhr.responseText);
});
xhr.send();
})();
</script>
2. open the file test.html in Chromium, like file:///home/hanshenrik/test.html
What is the expected behavior?
test.html loads itself as expected
What went wrong?
XMLHttpRequest cannot load file:///home/hanshenrik/test.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
(thrown on xhr.send();)
Did this work before? N/A
Chrome version: 53.0.2785.143 Channel: beta
OS Version: debian 9, kernel 4.8.7-1
Flash Version:
it does not work with other files in the same folder either. i originally tried to load a sqlite3 db file over xhr with it. works in firefox, but did not work in chromium
,
Jan 16 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by jonathan...@gmail.com
, Dec 11 2016Status: Untriaged (was: Unconfirmed)