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: unexpected malformed MIME header error #63168
Comments
Can you show us a standalone program that reproduces the problem? I don't understand the problem from your description. Thanks. |
@ianlancetaylor |
we'd need to see the request it's making to determine if it's valid |
CC @neild |
This may be due to https://go.dev/cl/410714, which restricts the bytes permitted in MIME headers to those listed in RFC 7230. |
@ianlancetaylor Thanks, I can confirm this is the root cause for me, is there any easy fix for experiencing such issue, we used to have some characters "parentheses" that are not allowed in 1.20 but we are hoping to keep them. |
Unfortunately, there is no easy fix, as the change was made for security reasons. Sorry. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
we are having it in 1.20.8 but not in 1.17
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
running the url test locally
What did you expect to see?
a status code 200 is returned
What did you see instead?
500 is returned and error message=net/http: HTTP/1.x transport connection broken: malformed MIME header line: (.*)A:B
FYI: (.*)A is defined as a queryparameter and B is the value here. idk why it is identified as MIME header here.
The text was updated successfully, but these errors were encountered: