httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rui Hu <tchrb...@gmail.com>
Subject Re: one question about HTTP response header "Content-Length"
Date Fri, 16 Mar 2012 06:54:47 GMT
Sorry I didn't describe my question accurately. I want to modify
"Cache-Control" depending on "Content-Length" and "Content-Type", and
"Content-Type" depending on r->uri. Therefore I must get those two fields
and set that one field.

Any suggestion?

Thanks very much!

VIc

2012/3/16 Joe Lewis <joe@joe-lewis.com>

> 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/
>



-- 
Best regards,

Rui Hu
----------------------------------------------------------------------------------------
State Key Laboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)
MSN: tchrbupt@gmail.com
-----------------------------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message