Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6E4F99BF for ; Fri, 16 Mar 2012 06:48:56 +0000 (UTC) Received: (qmail 88831 invoked by uid 500); 16 Mar 2012 06:48:56 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 88736 invoked by uid 500); 16 Mar 2012 06:48:53 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 88720 invoked by uid 99); 16 Mar 2012 06:48:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 06:48:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jlewis@silverhawk.net designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 06:48:44 +0000 Received: by dadp14 with SMTP id p14so15255856dad.18 for ; Thu, 15 Mar 2012 23:48:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=QMIJZJvsMIMWEYnJscIJEocnCEP2mR7y4+weddMA8rU=; b=IJsy7Kd1nlQm3H7+pgI3jsKcVRHdoV7zEoS+THsONZgtYasOBC98E5qs9PrptJQ+ss xGADdslMWXsNbc4u9fpC3EFwqx50mBXdm/ikIqalV3MudUV9XLEwooXyyhFmNsCjQGk2 q/+k7e4NzBzOSnEQmYX8Y+GiPsBVrQV4TGd1Lr1f+1zbKxvTaQrUWNVfg/FQJvxbIYP3 su58dv9AiN6iMlpV+H7Rx3VO8363Fq14NDu5Uj4R1b6yuRI+QGKWQsYKMp522kxx7kwe afGBMHbM2ObGnUXT3xsgEvpIwZe3ywH1MuPbGNEL668566DwgmBvnLWH9VTulA3aevTx DZPg== Received: by 10.68.239.195 with SMTP id vu3mr11795689pbc.49.1331880503399; Thu, 15 Mar 2012 23:48:23 -0700 (PDT) Received: from [192.168.1.148] (cottonwoodheights.silverhawk.net. [63.226.93.31]) by mx.google.com with ESMTPS id j4sm3608138pbg.31.2012.03.15.23.48.21 (version=SSLv3 cipher=OTHER); Thu, 15 Mar 2012 23:48:22 -0700 (PDT) Sender: Joe Lewis Message-ID: <4F62E23B.2090608@joe-lewis.com> Date: Fri, 16 Mar 2012 00:48:27 -0600 From: Joe Lewis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: one question about HTTP response header "Content-Length" References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkYn+fTXTS2YNsKELG9YrbljMq4ezQb4NZF7+mMAx8OWzBMC6D/9bbiFfiodzRIjbLb61TY X-Virus-Checked: Checked by ClamAV on apache.org On 3/16/12 12:31 AM, Rui Hu wrote: > I have another question. I found that not every request's response header > has field of "Content-Length", is it normal? That depends on what "normal" is. You are probably looking at what the content generators have provided, and the generators don't always set that. You might find that cgi's may or may not have the header. There are other modules hooking into things that alter the content even more, e.g. chunking and gzipping to name some examples of content being altered, and therefor, the headers having to be altered. If what you want is the served content length header, you might even consider hooking in a logging hook that provides the setting. > Additionally, can I modify HTTP response header in output filter of > AP_FTYPE_PROTOCOL type? Probably. I would only modify that if you were using an output filter (e.g. compression, again). Joe -- http://www.silverhawk.net/