Fix bug: The function uh_send_error() not sending the body

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2017-11-13 21:36:40 +08:00
parent 6f9da0f7ce
commit 84e1dbb713
1 changed files with 2 additions and 0 deletions

View File

@ -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)