Project

General

Profile

Feature #101 » lighttpd-request_header-print.patch

output byte, instead of number if the request line contains invalid char. perhaps the byte should be put inside single quotes to look better -- Elan Ruusamäe <glen - Anonymous, 2005-04-19 16:45

View differences:

../src/request.c 2005-04-19 19:05:05.000000000 +0300
/* check uri for invalid characters */
for (j = 0; j < con->request.uri->used - 1; j++) {
if (!request_uri_is_valid_char(con->request.uri->ptr[j])) {
unsigned char buf[2];
buf[0] = con->request.uri->ptr[j];
buf[1] = '\0';
con->http_status = 400;
con->keep_alive = 0;
log_error_write(srv, __FILE__, __LINE__, "sd",
"invalid character in URI -> 400",
con->request.uri->ptr[j]);
log_error_write(srv, __FILE__, __LINE__, "sss",
"invalid character in URI", buf, "-> 400");
if (srv->srvconf.log_request_header_on_error) {
log_error_write(srv, __FILE__, __LINE__, "Sb",
    (1-1/1)