ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Выставлят ь connection close



Hello!

On Fri, May 15, 2009 at 11:39:55PM +0400, Kirill A. Korinskiy wrote:

> At Fri, 15 May 2009 22:42:56 +0400,
> Igor Sysoev <is@xxxxxxxxxxxxx> wrote:
> > 
> > On Fri, May 15, 2009 at 10:31:16PM +0400, Kirill A. Korinskiy wrote:
> > 
> > > At Fri, 15 May 2009 21:45:09 +0400,
> > > Igor Sysoev <is@xxxxxxxxxxxxx> wrote:
> > > > 
> > > > Я вот не могу вспомнить сайты, выдающие 204.
> > > > Чего нельзя сказать про 304.
> > > > 
> > > 
> > > я тут подумал, меня вполне удовлетворит такой вот патч
> > > 
> > > diff --git a/src/http/ngx_http_header_filter_module.c 
> > > b/src/http/ngx_http_header_filter_module.c
> > > index 332fceb..6bf2fc4 100644
> > > --- a/src/http/ngx_http_header_filter_module.c
> > > +++ b/src/http/ngx_http_header_filter_module.c
> > > @@ -226,7 +226,7 @@ ngx_http_header_filter(ngx_http_request_t *r)
> > >                  r->headers_out.last_modified_time = -1;
> > >                  r->headers_out.last_modified = NULL;
> > >                  r->headers_out.content_length = NULL;
> > > -                r->headers_out.content_length_n = -1;
> > > +                r->headers_out.content_length_n = 0;
> > >              }
> > >  
> > >              status -= NGX_HTTP_OK;
> > 
> > rfc2616:
> > 
> > 10.2.5 204 No Content
> > 
> >    ...
> > 
> >    The 204 response MUST NOT include a message-body, and thus is always
> >    terminated by the first empty line after the header fields.
> > 
> 
> ага, только там не говорится что не надо при этом ставить
> Content-length в 0 при keep-alive

4.3 Message Body

   ...

   The presence of a message-body in a request is signaled by the
   inclusion of a Content-Length or Transfer-Encoding header field in
   the request's message-headers.

Maxim Dounin



 




Copyright © Lexa Software, 1996-2009.