httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52648] New: Code clean up (remove useless memory allocation)
Date Mon, 13 Feb 2012 09:22:33 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52648

             Bug #: 52648
           Summary: Code clean up (remove useless memory allocation)
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: minor
          Priority: P2
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: christophe.jaillet@wanadoo.fr
    Classification: Unclassified


Created attachment 28310
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28310
Proposed patch

Hi,

looking at the code, I have found 7 places where the r->request field is set.

mod_isapi.c
mod_asis.c
mod_cgi.c
mod_cgid.c
http_request.c
mod_proxy_scgi.c
protocol.c

Most of the time it is set using :
   r->method = apr_pstrdup(r->pool, "GET");


However, 'mod_proxy_scgi.c', only does :
   r->method = "GET";

I think that this is enough and that there is no need to 'apr_pstrdup' the name
of the method. The attached patch removes these, IMO, useless copies.

Should I be wrong and the copy useful, then I think that 'mod_proxy_scgi.c'
should be fixed to work as the other modules.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message