]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd-request_header-print.patch
- updated config from 1.3.14-20050420-191708 snap
[packages/lighttpd.git] / lighttpd-request_header-print.patch
1 output byte, instead of number if the request line contains invalid char
2
3 --- ../src/request.c~   2005-04-19 19:05:00.000000000 +0300
4 +++ ../src/request.c    2005-04-19 19:05:05.000000000 +0300
5 @@ -450,12 +450,15 @@
6                                 /* check uri for invalid characters */
7                                 for (j = 0; j < con->request.uri->used - 1; j++) {
8                                         if (!request_uri_is_valid_char(con->request.uri->ptr[j])) {
9 +                                               unsigned char buf[2];
10 +                                           buf[0] = con->request.uri->ptr[j];
11 +                                               buf[1] = '\0';
12 +
13                                                 con->http_status = 400;
14                                                 con->keep_alive = 0;
15                                                 
16 -                                               log_error_write(srv, __FILE__, __LINE__, "sd",
17 -                                                               "invalid character in URI -> 400",
18 -                                                               con->request.uri->ptr[j]);
19 +                                               log_error_write(srv, __FILE__, __LINE__, "sss",
20 +                                                               "invalid character in URI", buf, "-> 400");
21                                                 
22                                                 if (srv->srvconf.log_request_header_on_error) {
23                                                         log_error_write(srv, __FILE__, __LINE__, "Sb",
This page took 0.021999 seconds and 3 git commands to generate.