cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-10143) Local file:// url XmlHttpRequests are not allowed in WKWebViewEngine
Date Fri, 04 Dec 2015 19:52:11 GMT
Shazron Abdullah created CB-10143:
-------------------------------------

             Summary: Local file:// url XmlHttpRequests are not allowed in WKWebViewEngine
                 Key: CB-10143
                 URL: https://issues.apache.org/jira/browse/CB-10143
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin WKWebViewEngine
            Reporter: Shazron Abdullah


mobile-spec failure in XMLHttpRequest.spec.4 is a known WKWebView issue, where CORS is now
respected and cannot load files from file:// urls, only http*:// urls are allowed.

With CSP off to rule things out:
XHR to yourself of course works, but doesn't really make sense for
real-world use. XHR to a sibling file, parent file, or any child file
results in the error ""Cross origin requests are only supported for
HTTP”.

To illustrate:

  |
parent.xml
  |
www
  |---- index.html (file currently loaded)
  |---- sibling.xml
  |---- child-folder
  |       |---- child.xml

index.html is the currently loaded file in the WebView. From it, you
can't load parent.xml, sibling.xml nor child.xml using XHR according
to my tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message