~ubuntu-branches/ubuntu/dapper/apache2/dapper

« 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): Adam Conrad
  • Date: 2005-04-01 16:30:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050401163056-ve71h4qd7f4plu7j
Tags: 2.0.53-5ubuntu5
Fix the init script to not exit with an error when asked to
stop a daemon that isn't running (Was the root cause of #8374)

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