mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
06bd05634d
The current template... <HTML><HEAD><TITLE>%s</TITLE> </HEAD><BODY> <H1>Method Not Implemented</H1> Invalid method in request<P> </BODY></HTML> is highly confusing. The given title is easily overlooked and the hard-coded content is just plain wrong in most cases (I really read this as "the server did not understand the requested HTTP method) This patch changes the template to include the error reason in the body as well as in the header, and to infer the proper reason from the status code whenever the reason argument is NULL. This patch also removes a redundant evhttp_add_header from evhttp_send_error; evhttp_send_page already adds a "Connection: close" header.