cURL / Mailing Lists / curl-library / Single Mail


Re: http:/// and other slash amounts

From: Daniel Stenberg <>
Date: Mon, 9 May 2016 15:33:46 +0200 (CEST)

On Mon, 9 May 2016, Alex Bligh wrote:

> If you fix this, you should fix URL processing to permit it in general, and
> I see no reason to do that.

The patch I posted in the issue actually changes the parsing for all URLs,
yes. Even when passed to curl as "http:/"! :-O

But I could also mention that we're already since before doing things to URLs
that aren't in the spec when they arrive in a Location: just because browsers
set their own rules:

1 - we handle spaces and encode them as %20 before using the URL - a "real"
URL cannot have spaces

2 - we handle non-ascii letters and percent encode them. Legal URLs cannot
have such byte codes in the first place and certain browsers clearly do this
operation on their own.

After all, curl operates in the fuzzy area between a strict protocol
implemenation and the web as done and used by browsers. It isn't always easy.

Domenic Denicola pointed out to me on twitter [1] that the WHATWG URL spec
that the browsers are following allows _any_ number of slahes:

He has subsequently posted an issue to the whatwg url github issue tracker
about this:

[1] =

List admin:
Received on 2016-05-09