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
Inspecting the full response, it appears the custom message is sent, but it is sent as the status text:
$ curl -i localhost:8000 -d zborglh
HTTP/1.1 400 I cannot understand this POST data.
Server: Libuhttpd/3.14.1
Content-Length: 0
Content-Type: text/plain
Connection: close
A custom status text is far less useful than a custom message within the response body. Would you please consider restoring the functionality of the previous error() method?
The text was updated successfully, but these errors were encountered:
Prior to commit e557721, it was easy to send a custom error message to the client:
would give:
Since that commit, the
error()
method is no longer available. Instead, we have a new method calledsend_error()
, which always sends an empty body:gives:
$ curl localhost:8000 -d zborglh $ # ← empty response body
Inspecting the full response, it appears the custom message is sent, but it is sent as the status text:
A custom status text is far less useful than a custom message within the response body. Would you please consider restoring the functionality of the previous
error()
method?The text was updated successfully, but these errors were encountered: