httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r320823 - in /httpd/mod_mbox/trunk/module-2.0: mod_mbox_index.c mod_mbox_search.c
Date Thu, 13 Oct 2005 17:42:39 GMT
Author: pquerna
Date: Thu Oct 13 10:42:36 2005
New Revision: 320823

URL: http://svn.apache.org/viewcvs?rev=320823&view=rev
Log:
For all handlers, Deny all non-GET requests.

Modified:
    httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c
    httpd/mod_mbox/trunk/module-2.0/mod_mbox_search.c

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c?rev=320823&r1=320822&r2=320823&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c Thu Oct 13 10:42:36 2005
@@ -97,6 +97,12 @@
     char *etag;
     apr_time_exp_t extime;
     
+    /* Only allow GETs */
+    r->allowed |= (AP_METHOD_BIT << M_GET);
+    if (r->method_number != M_GET) {
+        return HTTP_METHOD_NOT_ALLOWED;
+    }
+
     ap_set_content_type(r, "application/xml; charset=utf-8");
 
     /* Try to make the index page more cache friendly */

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox_search.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox_search.c?rev=320823&r1=320822&r2=320823&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox_search.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox_search.c Thu Oct 13 10:42:36 2005
@@ -67,6 +67,12 @@
         return DECLINED;
     }
 
+    /* Only allow GETs */
+    r->allowed |= (AP_METHOD_BIT << M_GET);
+    if (r->method_number != M_GET) {
+        return HTTP_METHOD_NOT_ALLOWED;
+    } 
+
     conf = ap_get_module_config(r->per_dir_config, &mbox_module);
 
     if (conf->search_path == NULL) {



Mime
View raw message