]> Cypherpunks repositories - gostls13.git/commit
net/url: reject colon in first segment of relative path in Parse
authorRuss Cox <rsc@golang.org>
Thu, 20 Oct 2016 20:53:49 +0000 (16:53 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 24 Oct 2016 16:04:47 +0000 (16:04 +0000)
commitc5ccbdd22bdbdc43d541b7e7d4ed66ceb559030e
treeb93c3826e9848852f6cb3c8951730787a6876f9c
parentafe675c2fa9deacd61f5684be54f1ebbdc94fc0c
net/url: reject colon in first segment of relative path in Parse

RFC 3986 ยง3.3 disallows relative URL paths in which the first segment
contains a colon, presumably to avoid confusion with scheme:foo syntax,
which is exactly what happened in #16822.

Fixes #16822.

Change-Id: Ie4449e1dd21c5e56e3b126e086c3a0b05da7ff24
Reviewed-on: https://go-review.googlesource.com/31582
Reviewed-by: Quentin Smith <quentin@golang.org>
src/net/url/url.go
src/net/url/url_test.go