From apache-cvs-owner@apache.org Mon Mar 31 21:00:25 1997 Received: by taz.hyperreal.com (8.8.4/V2.0) id VAA04835; Mon, 31 Mar 1997 21:00:25 -0800 (PST) Received: by taz.hyperreal.com (8.8.4/V2.0) id VAA04820; Mon, 31 Mar 1997 21:00:22 -0800 (PST) Date: Mon, 31 Mar 1997 21:00:22 -0800 (PST) From: Roy Fielding Message-Id: <199704010500.VAA04820@taz.hyperreal.com> To: apache-cvs@hyperreal.com Subject: cvs commit: apache/src CHANGES http_core.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com fielding 97/03/31 21:00:21 Modified: src CHANGES http_core.c Log: Fixed status of response when POST is received for a nonexistant URL (was sending 405, now 404) and when any method is sent with a full-URI that doesn't match the server and the server is not acting as a proxy (was sending 501, now 403). Reviewed by: Chuck Murcko, Dean Gaudet Revision Changes Path 1.216 +5 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.215 retrieving revision 1.216 diff -C3 -r1.215 -r1.216 *** CHANGES 1997/03/29 03:40:33 1.215 --- CHANGES 1997/04/01 05:00:19 1.216 *************** *** 1,5 **** --- 1,10 ---- Changes with Apache 1.2b8 + *) Fixed status of response when POST is received for a nonexistant URL + (was sending 405, now 404) and when any method is sent with a + full-URI that doesn't match the server and the server is not acting + as a proxy (was sending 501, now 403). [Roy Fielding] + *) Host port changed to unsigned short. [Ken Coar] PR #276 *) Fix typo in command definition of AuthAuthoritative. [Ken Coar] PR #246 1.75 +3 -2 apache/src/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.74 retrieving revision 1.75 diff -C3 -r1.74 -r1.75 *** http_core.c 1997/03/11 03:41:42 1.74 --- http_core.c 1997/04/01 05:00:19 1.75 *************** *** 1264,1270 **** void *sconf = r->server->module_config; core_server_config *conf = get_module_config (sconf, &core_module); ! if (r->proxyreq) return NOT_IMPLEMENTED; if ((r->uri[0] != '/') && strcmp(r->uri, "*")) return BAD_REQUEST; if (r->server->path && --- 1264,1270 ---- void *sconf = r->server->module_config; 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 && *************** *** 1303,1309 **** 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_GET) return METHOD_NOT_ALLOWED; if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) { log_reason("File does not exist", --- 1303,1309 ---- 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; if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) { log_reason("File does not exist", *************** *** 1311,1316 **** --- 1311,1317 ---- : r->filename, r); return NOT_FOUND; } + if (r->method_number != M_GET) return METHOD_NOT_ALLOWED; if ((errstatus = set_last_modified (r, r->finfo.st_mtime)) || (errstatus = set_content_length (r, r->finfo.st_size)))