-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/url: no way to construct raw unqualified request URI starting with // #10433
Labels
Milestone
Comments
narma
pushed a commit
to FoxComm/vulcand
that referenced
this issue
Jul 27, 2015
Workaround for golang/go#10433
nota-ja
added a commit
to nota-ja/material-design
that referenced
this issue
Oct 27, 2015
* cloudfoundry/gorouter#60 * golang/go#10433 If baseurl does not have a trailing `/`, it is added: * https://github.com/spf13/hugo/blob/6af9d6789edef483cd297978e010b40117ff1443/commands/hugo.go#L209-L211 * https://github.com/spf13/hugo/blob/6af9d6789edef483cd297978e010b40117ff1443/commands/server.go#L89 * https://github.com/spf13/hugo/blob/6af9d6789edef483cd297978e010b40117ff1443/commands/server.go#L161-L163 So each `/` after baseurl is actually not needed.
This was fixed in Go 1.5: there is now a way to construct this request URI. Don't use Opaque, use RawPath (or just ParseRequestURI). I will add some tests to make sure this keeps working. |
CL https://golang.org/cl/17386 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
http://play.golang.org/p/67oKm8TFcm
When I pass the URL in the playground into the http transport, it will call .RequestURI() and do a GET http://foo/bar%2f, while what I actually wanted was GET //foo/bar%2f. It looks like there is no possible way to construct a URL that will query for //foo/bar%2f.
Not quite sure how to distinguish between the case of Opaque containing a qualified URI and an unqualified one starting with //. Does it make sense to look at the host part after the // and see if it matches what's in Host?
The text was updated successfully, but these errors were encountered: