Fix bug: The function uh_send_error() not sending the body
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
1 parent
6f9da0f7ce
commit
84e1dbb713
1 file changed
+2
@@ -517,6 +517,8 @@ void uh_send_error(struct uh_connection *con, int code, const char *reason)
|
||||
uh_send_head(con, code, strlen(reason), "Content-Type: text/plain\r\nConnection: close\r\n");
|
||||
con->flags |= UH_CON_CLOSE;
|
||||
}
|
||||
|
||||
uh_send(con, reason, strlen(reason));
|
||||
}
|
||||
|
||||
void uh_redirect(struct uh_connection *con, int code, const char *location)
|
||||
|
||||
Reference in new issue
Block a user