dgaudet 97/04/21 19:35:13
Modified: src CHANGES http_core.c mod_include.c Log: The default handler now logs invalid methods or URIs (i.e. PUT on an object that can't be PUT, or FOOBAR for some method FOOBAR that apache doesn't know about at all). Log 404s that occur in mod_include. Submitted by: Paul Sutton, John Van Essen Reviewed by: a cast of millions Revision Changes Path 1.240 +5 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.239 retrieving revision 1.240 diff -C3 -r1.239 -r1.240 *** CHANGES 1997/04/21 20:29:06 1.239 --- CHANGES 1997/04/22 02:35:09 1.240 *************** *** 1,5 **** --- 1,10 ---- Changes with Apache 1.2 + *) The default handler now logs invalid methods or URIs (i.e. PUT on an + object that can't be PUT, or FOOBAR for some method FOOBAR that + apache doesn't know about at all). Log 404s that occur in mod_include. + [Paul Sutton, John Van Essen] + *) If a soft timeout (or lingerout) occurs while trying to flush a buffer or write inside buff.c or fread'ing from a CGI's output, then the timeout would be ignored. [Roy Fielding] PR#373 1.78 +8 -2 apache/src/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.77 retrieving revision 1.78 diff -C3 -r1.77 -r1.78 *** http_core.c 1997/04/12 04:24:56 1.77 --- http_core.c 1997/04/22 02:35:10 1.78 *************** *** 1265,1271 **** core_server_config *conf = get_module_config (sconf, &core_module); if (r->proxyreq) return HTTP_FORBIDDEN; ! if ((r->uri[0] != '/') && strcmp(r->uri, "*")) return BAD_REQUEST; if (r->server->path && !strncmp(r->uri, r->server->path, r->server->pathlen) && --- 1265,1274 ---- core_server_config *conf = get_module_config (sconf, &core_module); if (r->proxyreq) return HTTP_FORBIDDEN; ! if ((r->uri[0] != '/') && strcmp(r->uri, "*")) { ! log_printf(r->server, "Invalid URI in request %s", r->the_request); ! return BAD_REQUEST; ! } if (r->server->path && !strncmp(r->uri, r->server->path, r->server->pathlen) && *************** *** 1301,1307 **** r->allowed |= (1 << M_TRACE); r->allowed |= (1 << M_OPTIONS); ! if (r->method_number == M_INVALID) return NOT_IMPLEMENTED; if (r->method_number == M_OPTIONS) return send_http_options(r); if (r->method_number == M_PUT) return METHOD_NOT_ALLOWED; --- 1304,1313 ---- r->allowed |= (1 << M_TRACE); r->allowed |= (1 << M_OPTIONS); ! if (r->method_number == M_INVALID) { ! log_printf(r->server, "Invalid method in request %s", r->the_request); ! return NOT_IMPLEMENTED; ! } if (r->method_number == M_OPTIONS) return send_http_options(r); if (r->method_number == M_PUT) return METHOD_NOT_ALLOWED; 1.29 +6 -1 apache/src/mod_include.c Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_include.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C3 -r1.28 -r1.29 *** mod_include.c 1997/04/06 07:43:41 1.28 --- mod_include.c 1997/04/22 02:35:10 1.29 *************** *** 1737,1743 **** if (!(allow_options (r) & OPT_INCLUDES)) return DECLINED; if (r->method_number != M_GET) return DECLINED; ! if (r->finfo.st_mode == 0) return NOT_FOUND; if (*state == xbithack_full #ifndef __EMX__ --- 1737,1748 ---- if (!(allow_options (r) & OPT_INCLUDES)) return DECLINED; if (r->method_number != M_GET) return DECLINED; ! if (r->finfo.st_mode == 0) { ! log_reason("File does not exist", ! r->path_info ? pstrcat(r->pool, r->filename, r->path_info, NULL) ! : r->filename, r); ! return NOT_FOUND; ! } if (*state == xbithack_full #ifndef __EMX__