net/url: generate correct Path when hostname empty
Parse("file:///foo") previously returned a URL with Scheme "file" and Path "///foo". Now it returns a URL with Path "/foo", such that &URL{Scheme: "file", Path: "/foo"}.String() == "file:///foo" This means that parsing and stringifying the URL "file:/foo" returns "file:///foo", technically a regression but one that only affects a corner case. Fixes #4189. R=bradfitz, rsc CC=golang-dev https://golang.org/cl/7135051
Showing
Please
register
or
sign in
to comment