~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to debian/patches/035_HEAD_Content-Length_Fix_From_CVS

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- build-tree/apache2/server/protocol.c        2004/08/12 17:48:35     1.150
2
 
+++ build-tree/apache2/server/protocol.c        2004/09/01 12:24:48     1.151
3
 
@@ -1244,8 +1244,11 @@
4
 
      *
5
 
      * We can only set a C-L in the response header if we haven't already
6
 
      * sent any buckets on to the next output filter for this request.
7
 
+     *
8
 
+     * Also check against cases of zero bytes sent, to avoid a bogus
9
 
+     * C-L on HEAD requests, or no-body GETs like 204s.
10
 
      */
11
 
-    if (ctx->data_sent == 0 && eos) {
12
 
+    if (ctx->data_sent == 0 && eos && r->bytes_sent > 0 ) {
13
 
         ap_set_content_length(r, r->bytes_sent);
14
 
     }
15