cvs commit: apache/src http_request.c
dgaudet 97/11/22 14:24:53 Modified:src Tag: APACHE_1_2_X http_request.c Log: Comment was a little bit inaccurate. Also explicitly mention 2068 S9, S14.23 in the error message so that maybe we can avoid more and more people complaining about us rejecting HTTP/1.1 requests without a Host: header. PR: 1454 Revision ChangesPath No revision No revision 1.50.2.8 +5 -2 apache/src/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apache/src/http_request.c,v retrieving revision 1.50.2.7 retrieving revision 1.50.2.8 diff -u -r1.50.2.7 -r1.50.2.8 --- http_request.c1997/08/11 14:20:03 1.50.2.7 +++ http_request.c1997/11/22 22:24:52 1.50.2.8 @@ -906,9 +906,12 @@ ((r->proto_num == 1001) && !table_get(r->headers_in, "Host"))) { /* Client sent us a HTTP/1.1 or later request without telling * us the hostname, either with a full URL or a Host: header. - * We therefore need to (as per the 1.1 spec) send an error + * We therefore need to (as per the 1.1 spec) send an error. + * As a special case, HTTP/1.1 mentions twice (S9, S14.23) + * that a request MUST contain a Host: header, and the server + * MUST respond with 400 if it doesn't. */ -log_reason ("client sent HTTP/1.1 request without hostname", +log_reason ("client sent HTTP/1.1 request without hostname (see RFC2068 sections 9 and 14.23)", r->uri, r); die (BAD_REQUEST, r); return;
cvs commit: apachen/src/main http_request.c
dgaudet 97/11/22 14:23:42 Modified:src/main http_request.c Log: Comment was a little bit inaccurate. Also explicitly mention 2068 S9, S14.23 in the error message so that maybe we can avoid more and more people complaining about us rejecting HTTP/1.1 requests without a Host: header. PR: 1454 Revision ChangesPath 1.94 +4 -2 apachen/src/main/http_request.c Index: http_request.c === RCS file: /export/home/cvs/apachen/src/main/http_request.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- http_request.c1997/11/15 03:29:57 1.93 +++ http_request.c1997/11/22 22:23:41 1.94 @@ -988,10 +988,12 @@ /* * Client sent us a HTTP/1.1 or later request without telling us the * hostname, either with a full URL or a Host: header. We therefore - * need to (as per the 1.1 spec) send an error + * need to (as per the 1.1 spec) send an error. As a special case, + * HTTP/1.1 mentions twice (S9, S14.23) that a request MUST contain + * a Host: header, and the server MUST respond with 400 if it doesn't. */ aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, - "client sent HTTP/1.1 request without hostname: %s", r->uri); + "client sent HTTP/1.1 request without hostname (see RFC2068 section 9, and 14.23): %s", r->uri); die(BAD_REQUEST, r); return; }
cvs commit: apachen/src/main http_main.c
dgaudet 97/11/21 18:04:45 Modified:src CHANGES src/main http_main.c Log: Fix problems with timeouts in inetd mode and -X mode. Reviewed by: Dirk-Willem van Gulik, Martin Kraemer Revision ChangesPath 1.518 +2 -0 apachen/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.517 retrieving revision 1.518 diff -u -r1.517 -r1.518 --- CHANGES 1997/11/22 01:59:54 1.517 +++ CHANGES 1997/11/22 02:04:41 1.518 @@ -1,5 +1,7 @@ Changes with Apache 1.3b4 + *) Fix problems with timeouts in inetd mode and -X mode. [Dean Gaudet] + *) Fix the spurious "(0)unknown error: mmap_handler: mmap failed" error messages. [Ben Hyde] 1.253 +18 -6 apachen/src/main/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apachen/src/main/http_main.c,v retrieving revision 1.252 retrieving revision 1.253 diff -u -r1.252 -r1.253 --- http_main.c 1997/11/16 15:43:16 1.252 +++ http_main.c 1997/11/22 02:04:44 1.253 @@ -223,6 +223,11 @@ int one_process = 0; +/* set if timeouts are to be handled by the children and not by the parent. + * i.e. child_timeouts = standalone || one_process. + */ +static int child_timeouts; + #ifdef DEBUG_SIGSTOP int raise_sigstop_flags; #endif @@ -863,12 +868,17 @@ #ifndef OPTIMIZE_TIMEOUTS old = alarm(x); #else -/* Just note the timeout in our scoreboard, no need to call the system. - * We also note that the virtual time has gone forward. - */ -old = scoreboard_image->servers[my_child_num].timeout_len; -scoreboard_image->servers[my_child_num].timeout_len = x; -++scoreboard_image->servers[my_child_num].cur_vtime; +if (child_timeouts) { + old = alarm(x); +} +else { + /* Just note the timeout in our scoreboard, no need to call the system. + * We also note that the virtual time has gone forward. + */ + old = scoreboard_image->servers[my_child_num].timeout_len; + scoreboard_image->servers[my_child_num].timeout_len = x; + ++scoreboard_image->servers[my_child_num].cur_vtime; +} #endif #endif return (old); @@ -3538,6 +3548,8 @@ suexec_enabled = init_suexec(); server_conf = read_config(pconf, ptrans, server_confname); + +child_timeouts = standalone || one_process; if (standalone) { open_logs(server_conf, pconf);
cvs commit: apachen/src/main http_core.c
dgaudet 97/11/21 17:59:58 Modified:src CHANGES src/main http_core.c Log: Fix the mmap_handler error messages again. Submitted by: Ben Hyde Reviewed by: Dean Gaudet, Randy Terbush, Martin Kraemer Revision ChangesPath 1.517 +3 -0 apachen/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.516 retrieving revision 1.517 diff -u -r1.516 -r1.517 --- CHANGES 1997/11/20 00:42:32 1.516 +++ CHANGES 1997/11/22 01:59:54 1.517 @@ -1,5 +1,8 @@ Changes with Apache 1.3b4 + *) Fix the spurious "(0)unknown error: mmap_handler: mmap failed" + error messages. [Ben Hyde] + Changes with Apache 1.3b3 *) WIN32: Work around brain-damaged spawn calls that can't deal 1.141 +5 -6 apachen/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apachen/src/main/http_core.c,v retrieving revision 1.140 retrieving revision 1.141 diff -u -r1.140 -r1.141 --- http_core.c 1997/11/15 00:16:50 1.140 +++ http_core.c 1997/11/22 01:59:57 1.141 @@ -1864,21 +1864,20 @@ block_alarms(); if ((r->finfo.st_size >= MMAP_THRESHOLD) && ( !r->header_only || (d->content_md5 & 1))) { - /* we need to protect ourselves in case we die while we've got the + /* we need to protect ourselves in case we die while we've got the * file mmapped */ mm = mmap (NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE, fileno(f), 0); + if (mm == (caddr_t)-1) { + aplog_error(APLOG_MARK, APLOG_CRIT, r->server, + "default_handler: mmap failed: %s", r->filename); + } } else { mm = (caddr_t)-1; } if (mm == (caddr_t)-1) { unblock_alarms(); - - if (r->finfo.st_size >= MMAP_THRESHOLD) { - aplog_error(APLOG_MARK, APLOG_CRIT, r->server, - "mmap_handler: mmap failed: %s", r->filename); - } #endif if (d->content_md5 & 1) {