Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 41180 invoked by uid 500); 1 Oct 2002 16:24:42 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 41169 invoked by uid 500); 1 Oct 2002 16:24:42 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 1 Oct 2002 16:24:41 -0000 Message-ID: <20021001162441.9081.qmail@icarus.apache.org> From: gstein@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server core.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N gstein 2002/10/01 09:24:41 Modified: server core.c Log: Fix bug in the default handler. POST is not allowed on regular files. The resource must be handled by something *other* than the default handler. Revision Changes Path 1.207 +8 -0 httpd-2.0/server/core.c Index: core.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/core.c,v retrieving revision 1.206 retrieving revision 1.207 diff -u -r1.206 -r1.207 --- core.c 30 Sep 2002 23:43:18 -0000 1.206 +++ core.c 1 Oct 2002 16:24:41 -0000 1.207 @@ -3259,6 +3259,14 @@ return HTTP_NOT_FOUND; } + /* we understood the POST method, but it isn't legal for this + particular resource. */ + if (r->method_number == M_POST) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "This resource does not accept the POST method."); + return HTTP_METHOD_NOT_ALLOWED; + } + if ((status = apr_file_open(&fd, r->filename, APR_READ | APR_BINARY, 0, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,