httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Tue, 01 Oct 2002 16:24:41 GMT
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,
  
  
  

Mime
View raw message