-
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/http: Double slash in request leads Method to always be GET #69063
Comments
heathcliff26
added a commit
to heathcliff26/kube-upgrade
that referenced
this issue
Aug 25, 2024
A double slash in the URL causes the request method to become GET. Remove it to ensure the daemon can aquire the lock. See: golang/go#69063 Signed-off-by: Heathcliff <heathcliff@heathcliff.eu>
heathcliff26
added a commit
to heathcliff26/kube-upgrade
that referenced
this issue
Aug 25, 2024
A double slash in the URL causes the request method to become GET. Remove it to ensure the daemon can aquire the lock. See: golang/go#69063 Signed-off-by: Heathcliff <heathcliff@heathcliff.eu>
The server returns a redirect to a clean path. Changing to GET is expected for the given http response code. Closing as working as intended. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go version
go version go1.23.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I accidentally created a double slash in an http request URL. I have written the following to reproduce:
Server
server.go
:Client
client.go
:What did you see happen?
Server receives a
GET
request, with no errors on the client/server sideWhat did you expect to see?
Server receives a
POST
request, or possible an error when creating the request.The text was updated successfully, but these errors were encountered: