[
https://issues.apache.org/jira/browse/CB-6299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940621#comment-13940621
]
ASF GitHub Bot commented on CB-6299:
------------------------------------
Github user purplecabbage commented on the pull request:
https://github.com/apache/cordova-wp8/pull/30#issuecomment-38070676
Thanks. I'll add a test to spec and close this up today.
Sent from my iPhone
> On Mar 19, 2014, at 7:42 AM, gabrielschulhof <[email protected]>
wrote:
>
> So, there are (probably more than) three cases when retrieving a local
file via Ajax:
>
> other-file.html
> works, because the URL is correctly assembled by Cordova
> x-wmapp0:www/other-file.html
> works, because the Uri class used here seems to understand this kind of
URL
> x-wmapp0:/www/other-file.html
> doesn't work, because the code I mention in my previous comment is not
having an effect due to the fact that the URL starts with the protocol
> Now, granted, the form x-wmapp0:/www/other.html may not occur much in the
wild, but performing URL calculations such as creating an absolute URL from a
relative URL are impossible when the URL scheme does not have a slash at the
root, because you cannot distinguish an absolute URL from a relative URL.
>
> —
> Reply to this email directly or view it on GitHub.
> Ajax of local files not working when requested via absolute URL
> ---------------------------------------------------------------
>
> Key: CB-6299
> URL: https://issues.apache.org/jira/browse/CB-6299
> Project: Apache Cordova
> Issue Type: Bug
> Components: WP7, WP8
> Reporter: Gabriel Schulhof
> Assignee: Jesse MacFadyen
>
> The code does not properly strip slashes from the path name when the URL is
> absolute, because in that case the path name is prefixed with the protocol,
> so the protocol must be stripped off first.
> References:
> https://github.com/jquery/jquery-mobile/issues/6574
--
This message was sent by Atlassian JIRA
(v6.2#6252)