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?
Prior to commit e5577217fc3e79978a22b925842794a447c36ed7, 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:
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?