httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Wed, 01 Sep 2004 12:24:49 GMT
niq         2004/09/01 05:24:49

  Modified:    server   protocol.c
  Log:
  Fix for Bug 18757 (sending bogus content-length of zero in no-body requests)
  
  Revision  Changes    Path
  1.151     +4 -1      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- protocol.c	12 Aug 2004 17:48:35 -0000	1.150
  +++ protocol.c	1 Sep 2004 12:24:48 -0000	1.151
  @@ -1244,8 +1244,11 @@
        *
        * We can only set a C-L in the response header if we haven't already
        * sent any buckets on to the next output filter for this request.
  +     *
  +     * Also check against cases of zero bytes sent, to avoid a bogus
  +     * C-L on HEAD requests, or no-body GETs like 204s.
        */
  -    if (ctx->data_sent == 0 && eos) {
  +    if (ctx->data_sent == 0 && eos && r->bytes_sent > 0 ) {
           ap_set_content_length(r, r->bytes_sent);
       }
   
  
  
  

Mime
View raw message