You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2001/09/20 19:38:49 UTC

[PATCH] get TRACE to work again

Currently, when the map-to-storage handler for TRACE returns DONE, the
caller -- ap_process_request_internal() -- catches that and returns
OK to its caller -- ap_process_request().  But ap_process_request(),
seeing OK, tries to run a handler.  It needs to skip that if the
request was completed in ap_process_request_internal().

So what am I missing :)

Index: modules/http/http_request.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/http/http_request.c,v
retrieving revision 1.114
diff -u -r1.114 http_request.c
--- modules/http/http_request.c	2001/09/19 05:52:42	1.114
+++ modules/http/http_request.c	2001/09/20 17:26:35
@@ -284,6 +284,10 @@
         access_status = ap_process_request_internal(r);
         if (access_status == OK)
             access_status = ap_invoke_handler(r);
+        else if (access_status == DONE) {
+            /* e.g., something not in storage like TRACE */
+            access_status = OK;
+        }
     }
 
     if (access_status == OK) {
Index: server/request.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/request.c,v
retrieving revision 1.50
diff -u -r1.50 request.c
--- server/request.c	2001/09/06 17:58:28	1.50
+++ server/request.c	2001/09/20 17:26:38
@@ -162,10 +162,7 @@
 
     if ((access_status = ap_run_map_to_storage(r))) {
         /* This request wasn't in storage (e.g. TRACE) */
-        if (access_status == DONE)
-	    return OK;
-	else
-            return access_status;
+        return access_status;
     }
 
     if ((access_status = ap_location_walk(r))) {


-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: [PATCH] get TRACE to work again

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Jeff Trawick" <tr...@attglobal.net>
Sent: Thursday, September 20, 2001 12:38 PM


> Currently, when the map-to-storage handler for TRACE returns DONE, the
> caller -- ap_process_request_internal() -- catches that and returns
> OK to its caller -- ap_process_request().  But ap_process_request(),
> seeing OK, tries to run a handler.  It needs to skip that if the
> request was completed in ap_process_request_internal().

Yuck, my bad.

> So what am I missing :)

Nothing, please commit.

> Index: modules/http/http_request.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/modules/http/http_request.c,v
> retrieving revision 1.114
> diff -u -r1.114 http_request.c
> --- modules/http/http_request.c 2001/09/19 05:52:42 1.114
> +++ modules/http/http_request.c 2001/09/20 17:26:35
> @@ -284,6 +284,10 @@
>          access_status = ap_process_request_internal(r);
>          if (access_status == OK)
>              access_status = ap_invoke_handler(r);
> +        else if (access_status == DONE) {
> +            /* e.g., something not in storage like TRACE */
> +            access_status = OK;
> +        }
>      }
>  
>      if (access_status == OK) {
> Index: server/request.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/server/request.c,v
> retrieving revision 1.50
> diff -u -r1.50 request.c
> --- server/request.c 2001/09/06 17:58:28 1.50
> +++ server/request.c 2001/09/20 17:26:38
> @@ -162,10 +162,7 @@
>  
>      if ((access_status = ap_run_map_to_storage(r))) {
>          /* This request wasn't in storage (e.g. TRACE) */
> -        if (access_status == DONE)
> -     return OK;
> - else
> -            return access_status;
> +        return access_status;
>      }
>  
>      if ((access_status = ap_location_walk(r))) {
> 
> 
> -- 
> Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
>        http://www.geocities.com/SiliconValley/Park/9289/
>              Born in Roswell... married an alien...
>