Skip to content

Conversation

@adityagarde
Copy link

There is a typo in the URLs tutorial. RawPath is used instead of RawQuery.

@hiteshchoudhary
Copy link
Owner

"Note that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/. A consequence is that it is impossible to tell which slashes in the Path were slashes in the raw URL and which were %2f. This distinction is rarely important, but when it is, the code should use RawPath, an optional field which only gets set if the default encoding is different from Path."

This is coming directly from golang docs. It's not a typo. There is a significant usage for RAWPATH.

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