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: Why + is parsed to space, but = is not in parseForm #17479
Comments
For questions, see https://golang.org/wiki/Questions |
package main import ( func main() { } On Mon, Oct 17, 2016 at 9:38 PM, whitezhang notifications@github.com
|
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.6.1
What operating system and processor architecture are you using (
go env
)?What did you do?
I post a form to the golang backend. And In my nginx log, the code is
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewoJcHJpbnRmKCIzXG4iKTsKCXJldHVybiAwOwp9Cg==
, where there is a+
.And I parse the form using the following code:
But when I print the code, I got
I2luY2x1ZGUgPHN0ZGlvLmg CmludCBtYWluKCkKewoJcHJpbnRmKCIzXG4iKTsKCXJldHVybiAwOwp9Cg==
, where the+
is replaced by spaceI also tried
rawCode := url.QueryEscape(r.PostFormValue("code"))
, but I gotI2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewoJcHJpbnRmKCIzXG4iKTsKCXJldHVybiAwOwp9Cg%3D%3D
instead.Is there a bug in golang?? Because here should be
I2luY2x1ZGUgPHN0ZGlvLmg CmludCBtYWluKCkKewoJcHJpbnRmKCIzXG4iKTsKCXJldHVybiAwOwp9Cg%3D%3D
if parsed or ``I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewoJcHJpbnRmKCIzXG4iKTsKCXJldHVybiAwOwp9Cg==` if not parsed.The text was updated successfully, but these errors were encountered: