httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rui Hu <>
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!


2012/3/16 Joe Lewis <>

> 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
> Probably.  I would only modify that if you were using an output filter
> (e.g. compression, again).
> Joe
> --

Best regards,

Rui Hu
State Key Laboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)

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