[dev] status line processing in filter module

Igor Sysoev is at rambler-co.ru
Fri Oct 19 19:25:17 MSD 2007


On Fri, Oct 19, 2007 at 02:55:59PM +0200, Manlio Perillo wrote:

> When trying to enable support for Last-Modified validation in mod_wsgi I 
> have found this code in the filter module:
> 
> /* status line */
> 
>     if (r->headers_out.status_line.len) {
>         len += r->headers_out.status_line.len;
> #if (NGX_SUPPRESS_WARN)
>         status = NGX_INVALID_ARRAY_INDEX;
> #endif
> 
>     } else {
> 
> 
> 
> The problem here is that the WSGI application returns a full status line 
> (including the Reason-Phrase).
> 
> This means that the not_modified_filter has no effect, since nginx will 
> not set the status_code to NGX_HTTP_NOT_MODIFIED and r->header_only = 1.
> 
> Of course in mod_wsgi I can just ignore the Reason-Phrase.

nginx passes status line from proxied server, fastcgi server, etc. untouched.
So mod_wsgi should if-modified-since by itself.

> One last thing: does Nginx supports the Etag validation?

No. I do see any advantages of ETag for serving static files.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list