On Fri, Jan 08 2016 14:55:12 +0200, Lauri Tirkkonen wrote:
> > $ obj/ftp -Mo- https://junkpile.org/redir-to-colon
> > Trying 195.95.187.26...
> > Requesting https://junkpile.org/redir-to-colon
> > Redirected to test:file.txt
> > ftp: url_get: Invalid URL 'test:file.txt'
> > 
> > This is a contrived test, but there are definitely URLs in the
> > wild containing : and it wouldn't be entirely unexpected to see
> > a relative redirect to them.
> 
> I was following RFC 3986 which states that relative-path segments
> containing a colon cannot be used as the first segment [0].
> 
> [0]: https://tools.ietf.org/html/rfc3986#section-4.2

I also tried a few other http clients with your URL. Firefox, Chrome and
wget all fail to request /test:file.txt (they all consider test: to be a
scheme), but curl follows the redirect ignoring the RFC. Given that, I
would leave the patch as it is.

-- 
Lauri Tirkkonen | lotheac @ IRCnet

Reply via email to