You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2012/07/15 23:19:54 UTC

svn commit: r1361803 - in /httpd/httpd/trunk/modules: arch/win32/mod_isapi.c generators/mod_asis.c generators/mod_cgi.c generators/mod_cgid.c http/http_request.c

Author: sf
Date: Sun Jul 15 21:19:54 2012
New Revision: 1361803

URL: http://svn.apache.org/viewvc?rev=1361803&view=rev
Log:
Code clean up (remove useless memory allocation) 

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52648

Modified:
    httpd/httpd/trunk/modules/arch/win32/mod_isapi.c
    httpd/httpd/trunk/modules/generators/mod_asis.c
    httpd/httpd/trunk/modules/generators/mod_cgi.c
    httpd/httpd/trunk/modules/generators/mod_cgid.c
    httpd/httpd/trunk/modules/http/http_request.c

Modified: httpd/httpd/trunk/modules/arch/win32/mod_isapi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/win32/mod_isapi.c?rev=1361803&r1=1361802&r2=1361803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/win32/mod_isapi.c (original)
+++ httpd/httpd/trunk/modules/arch/win32/mod_isapi.c Sun Jul 15 21:19:54 2012
@@ -894,7 +894,7 @@ static int APR_THREAD_FUNC regfnServerSu
         }
 
         /* Reset the method to GET */
-        r->method = apr_pstrdup(r->pool, "GET");
+        r->method = "GET";
         r->method_number = M_GET;
 
         /* Don't let anyone think there's still data */

Modified: httpd/httpd/trunk/modules/generators/mod_asis.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_asis.c?rev=1361803&r1=1361802&r2=1361803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_asis.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_asis.c Sun Jul 15 21:19:54 2012
@@ -70,7 +70,7 @@ static int asis_handler(request_rec *r)
         /* This redirect needs to be a GET no matter what the original
          * method was.
          */
-        r->method = apr_pstrdup(r->pool, "GET");
+        r->method = "GET";
         r->method_number = M_GET;
 
         ap_internal_redirect_handler(location, r);

Modified: httpd/httpd/trunk/modules/generators/mod_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgi.c?rev=1361803&r1=1361802&r2=1361803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgi.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgi.c Sun Jul 15 21:19:54 2012
@@ -993,7 +993,7 @@ static int cgi_handler(request_rec *r)
             /* This redirect needs to be a GET no matter what the original
              * method was.
              */
-            r->method = apr_pstrdup(r->pool, "GET");
+            r->method = "GET";
             r->method_number = M_GET;
 
             /* We already read the message body (if any), so don't allow

Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=1361803&r1=1361802&r2=1361803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgid.c Sun Jul 15 21:19:54 2012
@@ -1594,7 +1594,7 @@ static int cgid_handler(request_rec *r)
             /* This redirect needs to be a GET no matter what the original
              * method was.
              */
-            r->method = apr_pstrdup(r->pool, "GET");
+            r->method = "GET";
             r->method_number = M_GET;
 
             /* We already read the message body (if any), so don't allow

Modified: httpd/httpd/trunk/modules/http/http_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_request.c?rev=1361803&r1=1361802&r2=1361803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_request.c (original)
+++ httpd/httpd/trunk/modules/http/http_request.c Sun Jul 15 21:19:54 2012
@@ -197,7 +197,7 @@ AP_DECLARE(void) ap_die(int type, reques
                                              "error-notes")) != NULL) {
                 apr_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes);
             }
-            r->method = apr_pstrdup(r->pool, "GET");
+            r->method = "GET";
             r->method_number = M_GET;
             ap_internal_redirect(custom_response, r);
             return;