You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ curl -i 'localhost:8123/dfsfdsfds '
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close
400 Bad Request
Note the space character at the end of the URL, though it doesn't matter where in the query part the space character is.
What did you expect to see?
Preferably that the my HTTP request handler is invoked and that I see output in the shell where the server was started. But if I could register some extra "request error handler" instead, it would also be fine.
My use case is an internally used microservice and I want to implement a proper error handling -- e.g. writing invalid request strings to a log.
What did you see instead?
No output in the shell where the server is started. See also above section "What did you do?" and "What did you expect to see?"
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Using the HTTP server from
net/http
it seems not possible to handle requests that contain certain, unescaped characters.Given this example program:
Trying this request:
Note the space character at the end of the URL, though it doesn't matter where in the query part the space character is.
What did you expect to see?
Preferably that the my HTTP request handler is invoked and that I see output in the shell where the server was started. But if I could register some extra "request error handler" instead, it would also be fine.
My use case is an internally used microservice and I want to implement a proper error handling -- e.g. writing invalid request strings to a log.
What did you see instead?
No output in the shell where the server is started. See also above section "What did you do?" and "What did you expect to see?"
The text was updated successfully, but these errors were encountered: