Skip to content

Conversation

yohfee
Copy link
Contributor

@yohfee yohfee commented Jun 10, 2025

url.URL.String() encodes its Path. So if requestInternal arg path is already encoded, it will be encoded twice.

And http.Request.URL.Path is decoded value but http.Request.URL.RawPath is encoded value.
They should be treated individually.

Furthermore RawPath may be empty when Path has no encodable characters.
https://cs.opensource.google/go/go/+/refs/tags/go1.24.4:src/net/url/url.go;l=366-383

Copy link
Contributor

@yseto yseto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good.

@yohfee yohfee merged commit 24ca054 into master Jun 10, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants