[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #31309] URL problems with local files and anchors
From: |
Richard Frith-Macdonald |
Subject: |
[bug #31309] URL problems with local files and anchors |
Date: |
Tue, 12 Oct 2010 13:53:20 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 |
Follow-up Comment #3, bug #31309 (project gnustep):
I added some tests for file parsing and tweaked NSURL to correspond exactly
to OSX behavior, but I think the differences were very minor and should not
have an impact on this issue.
It looks to me like OSX parses file URLs correctly ... ie it conforms to the
RFCs and does NOT believe that a hash in the path separates path from fragment
(ie the -path method returns the full path including the hash and anything
after it, and the -fragment method returns nil).
It's possible/probable that the code is faulty (building a bad file URL), but
that on OSX there is some undocumented behaviour to catch such coding errors.
eg. When loading data from a file URL, if the specified file cannot be found
the class might attempt to locate the file by truncating the path at the first
hash it finds.
Maybe this is even documented somewhere ... if you can find such
documentation (or write some testcases to determine exactly what happens), we
could change the GNUstep code to match.
For instance, if you create a URL with the path '/foo#bar' and you have two
files 'foo#bar' and 'foo', which file does the data come from when you get the
data from the URL?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31309>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/