httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Sussman <mydd...@vidya.com>
Subject again - patch correction
Date Thu, 04 Jan 1996 07:40:32 GMT

This just is not my night.  I must not be paying proper attention.  Here is
the -correct- patch.  I forgot the pstrdup in the mod_cgi patch.

I think I'm gonna stop working and go home before I cause any more damage :).


-- snip --

From: asussman@vidya.com (Adam Sussman)
Subject: Preserve HTTP Method accross an internal redirect.
Affects: http_request.c mod_cgi.c
ChangeLog: The current internal_redirect code always hard sets the new request
        to a GET method.  This is not always desireable.  This patch causes
        internal_redirect to preserve the original request method except in
        the case of a redirect from the CGI module.

*** http_request.c.old	Fri Nov 17 13:33:15 1995
--- http_request.c	Wed Jan  3 01:34:14 1996
***************
*** 658,671 ****
      new->prev = r;
      r->next = new;
      
-     /* We are redirecting.  Treat the internally generated transaction
-      * as a GET, since there is not a chance of its getting POST-style
-      * arguments.   
-      */
-     new->method = "GET";
-     new->method_number = M_GET;
- 
      /* Inherit the rest of the protocol info... */
      
      new->status = r->status;
      new->assbackwards = r->assbackwards;
--- 658,667 ----
      new->prev = r;
      r->next = new;
      
      /* Inherit the rest of the protocol info... */
+ 
+     new->method = pstrdup(r->pool, r->method);
+     new->method_number = r->method_number;
      
      new->status = r->status;
      new->assbackwards = r->assbackwards;
*** mod_cgi.c.old	Wed Jan  3 23:16:52 1996
--- mod_cgi.c	Wed Jan  3 23:16:05 1996
***************
*** 315,320 ****
--- 315,324 ----
  	        continue;
  	    kill_timeout (r);
  
+ 	    /* set the request method to get for the reidirect */
+             r->method = pstrdup(r->pool, "GET");
+             r->method_number = M_GET;
+ 	    
  	    internal_redirect (location, r);
  	    return OK;
          }

Mime
View raw message