httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <roy.field...@gmail.com>
Subject Re: svn commit: r760167 - in /httpd/httpd/trunk: CHANGES server/util_script.c
Date Mon, 30 Mar 2009 22:48:17 GMT
-1 (veto)

Filling obscure areas of the server with stupid hacks that modify
the request structure because of something the content generator
*might* do is harmful to overall stability.  204 and 304 are already
handled elsewhere (or, if not, they should be handled elsewhere).

....Roy

On Mar 30, 2009, at 1:49 PM, niq@apache.org wrote:

> Author: niq
> Date: Mon Mar 30 20:49:10 2009
> New Revision: 760167
>
> URL: http://svn.apache.org/viewvc?rev=760167&view=rev
> Log:
> HTTPD script support
> When a script returns a no-body response code, pretend it was a HEAD
> request so as to drop any body the script might erroneously generate.
>
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/server/util_script.c
>
> Modified: httpd/httpd/trunk/CHANGES
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES? 
> rev=760167&r1=760166&r2=760167&view=diff
> ====================================================================== 
> ========
> --- httpd/httpd/trunk/CHANGES [utf-8] (original)
> +++ httpd/httpd/trunk/CHANGES [utf-8] Mon Mar 30 20:49:10 2009
> @@ -2,6 +2,9 @@
>
>  Changes with Apache 2.3.3
>
> +  *) script support: avoid possibly sending contents with a 204 or  
> 304
> +     response.  PR 40953 [Nick Kew]
> +
>    *) ab: Fix a 100% CPU loop on platforms where a failed non- 
> blocking connect
>       returns EINPROGRESS and a subsequent poll() returns only  
> POLLERR.
>       Observed on HP-UX.  [Eric Covener]
>
> Modified: httpd/httpd/trunk/server/util_script.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/ 
> util_script.c?rev=760167&r1=760166&r2=760167&view=diff
> ====================================================================== 
> ========
> --- httpd/httpd/trunk/server/util_script.c (original)
> +++ httpd/httpd/trunk/server/util_script.c Mon Mar 30 20:49:10 2009
> @@ -462,6 +462,10 @@
>              if ((cgi_status == HTTP_UNSET) && (r->method_number ==  
> M_GET)) {
>                  cond_status = ap_meets_conditions(r);
>              }
> +            else if ((cgi_status == HTTP_NO_CONTENT) ||
> +                     (cgi_status == HTTP_NOT_MODIFIED)) {
> +                r->header_only = 1; /* discard any body */
> +            }
>              apr_table_overlap(r->err_headers_out, merge,
>                  APR_OVERLAP_TABLES_MERGE);
>              if (!apr_is_empty_table(cookie_table)) {
>
>


Mime
View raw message