mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
add more error output for request parse errors
This commit is contained in:
@@ -533,8 +533,12 @@ httpd_thread(void *arg)
|
||||
/* Parse HTTP request from data read from connection */
|
||||
http_request_add_data(connection->request, buffer, ret);
|
||||
if (http_request_has_error(connection->request)) {
|
||||
logger_log(httpd->logger, LOGGER_ERR, "httpd error in parsing: %s",
|
||||
http_request_get_error_name(connection->request));
|
||||
char *data = utils_data_to_string((const unsigned char *) buffer, ret, 16);
|
||||
logger_log(httpd->logger, LOGGER_ERR, "httpd error in parsing: %s\n%s\n%s",
|
||||
http_request_get_error_name(connection->request),
|
||||
http_request_get_error_description(connection->request),
|
||||
data);
|
||||
free (data);
|
||||
httpd_remove_connection(httpd, connection);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user