httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject [PATCH] Re: don't try this at home
Date Fri, 31 May 2002 13:36:03 GMT
Jeff Trawick <trawick@attglobal.net> writes:

> okay, do try it, but (unlike somebody last night) don't try it on daedalus
> 
> GET / HTTP/1.1
> Accept: */*
> Host: test
> Content-Type: application/x-www-form-urlencoded
> Transfer-Encoding: chunked
> 
> AAAAAAAAAAAAAAAAAAA

The situation where I (still) get 200 on the GET followed by 500 for
method AAAAAAA... is when "GET /" is handled by mod_autoindex.

Isn't mod_autoindex responsible for discarding the request body?

With this change I'm getting 413 for the autoindex request:

Index: modules/generators/mod_autoindex.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_autoindex.c,v
retrieving revision 1.108
diff -u -r1.108 mod_autoindex.c
--- modules/generators/mod_autoindex.c	18 May 2002 04:13:12 -0000	1.108
+++ modules/generators/mod_autoindex.c	31 May 2002 13:30:52 -0000
@@ -2133,6 +2133,12 @@
     /* OK, nothing easy.  Trot out the heavy artillery... */
 
     if (allow_opts & OPT_INDEXES) {
+        int errstatus;
+
+        if ((errstatus = ap_discard_request_body(r)) != OK) {
+            return errstatus;
+        }
+
         /* KLUDGE --- make the sub_req lookups happen in the right directory.
          * Fixing this in the sub_req_lookup functions themselves is difficult,
          * and would probably break virtual includes...


-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message