We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
405 "Method Not Allowed" isn't formatted:
$ curl -v http://localhost:8080/post-endpoint * Trying ::1:8080... * Connected to localhost (::1) port 8080 (#0) > GET /post-endpoint HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.70.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 405 Method Not Allowed < Transfer-Encoding: chunked < Date: Sat, 26 Sep 2020 16:33:56 GMT < Server: Warp/3.3.12 < * Connection #0 to host localhost left intact
404 "Not Found" is formatted:
$ curl -v http://localhost:8080/nonexistent-endpoint * Trying ::1:8080... * Connected to localhost (::1) port 8080 (#0) > GET /nonexistent-endpoint HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.70.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 404 Not Found < Transfer-Encoding: chunked < Date: Sat, 26 Sep 2020 17:01:22 GMT < Server: Warp/3.3.12 < Content-Type: application/json < * Connection #0 to host localhost left intact {"msg":"Not found path: /other-endpoint"}
You can see the various places where unformatted errors are returned in the code:
$ git grep -E 'Fail.*err[0-9]+' servant-server/src servant-server/src/Servant/Server.hs: routerLayout (route p context (emptyDelayed (FailFatal err501))) servant-server/src/Servant/Server/Internal.hs: | otherwise = delayedFail err405 servant-server/src/Servant/Server/Internal.hs: | otherwise = delayedFail err406 servant-server/src/Servant/Server/Internal.hs: Nothing -> FailFatal err406 -- this should not happen (checked before), so we make it fatal if it does servant-server/src/Servant/Server/Internal.hs: accCheck = when (isNothing cmediatype) $ delayedFail err406 servant-server/src/Servant/Server/Internal.hs: Nothing -> delayedFail err415 servant-server/src/Servant/Server/Internal/BasicAuth.hs: Unauthorized -> delayedFailFatal err403 servant-server/src/Servant/Server/Internal/BasicAuth.hs: where plzAuthenticate = delayedFailFatal err401 { errHeaders = [mkBAChallengerHdr realm] }
The text was updated successfully, but these errors were encountered:
Hmm, as far as I understand HTTP spec, 404 and 405 responses are not expected to have a body anyway. Do you disagree?
Sorry, something went wrong.
No branches or pull requests
405 "Method Not Allowed" isn't formatted:
404 "Not Found" is formatted:
You can see the various places where unformatted errors are returned in the code:
The text was updated successfully, but these errors were encountered: