Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19D7B1085A for ; Wed, 19 Mar 2014 16:14:44 +0000 (UTC) Received: (qmail 19490 invoked by uid 500); 19 Mar 2014 16:14:43 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 19442 invoked by uid 500); 19 Mar 2014 16:14:43 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 19434 invoked by uid 99); 19 Mar 2014 16:14:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 16:14:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E0F5A984693; Wed, 19 Mar 2014 16:14:42 +0000 (UTC) From: purplecabbage To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-wp8 pull request: CB-6299 Strip protocol and leading slash... Content-Type: text/plain Message-Id: <20140319161442.E0F5A984693@tyr.zones.apache.org> Date: Wed, 19 Mar 2014 16:14:42 +0000 (UTC) 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 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. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---