]> Cypherpunks repositories - gostls13.git/commit
URL should have an empty Scheme if there is an invalid character (i.e.
authorJacob Baskin <jbaskin@google.com>
Tue, 16 Jun 2009 20:23:42 +0000 (13:23 -0700)
committerJacob Baskin <jbaskin@google.com>
Tue, 16 Jun 2009 20:23:42 +0000 (13:23 -0700)
commit536c2aa6aebc7b89b9c57e09b41985875aa1aa01
treef6eac354d3b56a9f06adfa55d2da7dc2571ebffa
parentd8e4446d129f823a3f92d5750b1bf8fdd1d1a242
URL should have an empty Scheme if there is an invalid character (i.e.
not [a-zA-Z0-9+-.]) before there is a ":".

This is particularly helpful in the erroneous-but-relatively-common
case of relative URLs containing an unescaped colon in the query
string--see the added test for an example.

R=rsc
APPROVED=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=30354
CL=30356
src/pkg/http/url.go
src/pkg/http/url_test.go