[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: epoch fix?

On Wed, May 08, 2013 at 11:08:21AM +0100, Lars Wirzenius wrote:
> On Wed, May 08, 2013 at 11:55:48AM +0200, Adam Borowski wrote:
> > wget -q -O- http://angband.pl/tmp/foo%3Abar
> > :
> > -- should be %3A !
> > 
> > And serving .deb files via http isn't exactly a fringe use case...
> URL encoding is well-known and works quite well. It does not interfere
> with percent signs in filenames at all. On your server, the name of the
> file on disk is "foo%3Abar": the sequence of letters is 'f', 'o', 'o',
> '%', '3', 'A', 'b', a', 'r'. When used in a URL, this gets encoded as
> "foo%253Abar". When the HTTP server receives the URL, it decodes it
> and gets back "foo%3Abar".
> The wget example you gave did not URL encode the filename. This meant
> that the HTTP server decodes the un-encoded filename. That's a bug
> in your URL construction.

I seriously doubt even a quarter of our tools bothers with this kind of
encoding.  All other characters in deb file names don't require any special

> The correct URL to give wget is http://angband.pl/tmp/foo%253Abar
> and indeed that is the URL that Apache gives you when you click
> the file in the directory listing, or use "Copy Link Location" in
> Firefox's popup menu.

I'd say this discrepancy is a good reason to avoid fancy characters in
file names whenever possible.  Even something Unicode would be safer.


Reply to: