You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rajwinder-office Singh <ra...@gmail.com> on 2009/09/25 03:34:43 UTC
[users@httpd] Re: SSI + content-length headers
>
> I have a situation :
>
> 1. I have to keep SSI enabled on all *.html pages.
> 2. SSI removes content-length + Last-modified headers from *.html
> 3. I have to keep these two headers for it to be cached by my CDN provider.
> 4. No fun of using XbiHack cause every other html is having ssi.
>
> Does it make sense to calculate these two headers and then insert both
> headers in some kind of output filter ?
>
> Or is there any way to disable this behaviour that apache do ?
>
> Thanks
> Singh
>
>
Re: [users@httpd] Re: SSI + content-length headers
Posted by Rajwinder-office Singh <ra...@gmail.com>.
I did some work on this and able to insert content-length header.
Now the issue is with last-modified header only.
I cannot use xbithack full.
I dont have to calculate exact last modified header as my CDN provider is
happy with any Dummy last-modifed header having value older then current
time. What i need to do is to insert last-modifed header with value 1 week
older then current time.
Any directions ?
On Mon, Sep 28, 2009 at 1:59 AM, Rajwinder-office Singh <
rajwinder.makkar.office@gmail.com> wrote:
>
>
> On Fri, Sep 25, 2009 at 10:41 AM, Nick Kew <ni...@webthing.com> wrote:
>
>> Rajwinder-office Singh wrote:
>>
>>> I have a situation :
>>>
>>> 1. I have to keep SSI enabled on all *.html pages.
>>> 2. SSI removes content-length + Last-modified headers from *.html
>>> 3. I have to keep these two headers for it to be cached by my CDN
>>> provider.
>>>
>>
>> Content-length shouldn't affect cacheability. If you're sure it does,
>> you might consider a bug report to whoever is responsible.
>>
>> 4. No fun of using XbiHack cause every other html is having ssi.
>>>
>>
>> What's wrong with xbithack? Just scope it where you want it.
>>
>
>
>> -- Nothing wrong with xbitHack but it will not make any diff in my case as
>> adding inlcude output filter to all *.html or making every *.html an
>> executble.
>>
>> Does it make sense to calculate these two headers and then insert
>>> both headers in some kind of output filter ?
>>>
>>
>> Yes, you'd need to compute content-length in an output filter.
>> And it would need to buffer your output, which makes for a huge
>> performance hit if you're serving big documents.
>>
>> -- I only need to do it for *.html so should not be a issue ( i guess ) .
> I searched around for such a output filter but cant find any "ready to use"
> type. any pointers on any thread or if any body has already written some
> thing like that ?
>
>> --
>> Nick Kew
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
Re: [users@httpd] Re: SSI + content-length headers
Posted by Rajwinder-office Singh <ra...@gmail.com>.
On Fri, Sep 25, 2009 at 10:41 AM, Nick Kew <ni...@webthing.com> wrote:
> Rajwinder-office Singh wrote:
>
>> I have a situation :
>>
>> 1. I have to keep SSI enabled on all *.html pages.
>> 2. SSI removes content-length + Last-modified headers from *.html
>> 3. I have to keep these two headers for it to be cached by my CDN
>> provider.
>>
>
> Content-length shouldn't affect cacheability. If you're sure it does,
> you might consider a bug report to whoever is responsible.
>
> 4. No fun of using XbiHack cause every other html is having ssi.
>>
>
> What's wrong with xbithack? Just scope it where you want it.
>
> -- Nothing wrong with xbitHack but it will not make any diff in my case as
> adding inlcude output filter to all *.html or making every *.html an
> executble.
>
> Does it make sense to calculate these two headers and then insert
>> both headers in some kind of output filter ?
>>
>
> Yes, you'd need to compute content-length in an output filter.
> And it would need to buffer your output, which makes for a huge
> performance hit if you're serving big documents.
>
> -- I only need to do it for *.html so should not be a issue ( i guess ) . I
searched around for such a output filter but cant find any "ready to use"
type. any pointers on any thread or if any body has already written some
thing like that ?
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Re: SSI + content-length headers
Posted by Nick Kew <ni...@webthing.com>.
Rajwinder-office Singh wrote:
> I have a situation :
>
> 1. I have to keep SSI enabled on all *.html pages.
> 2. SSI removes content-length + Last-modified headers from *.html
> 3. I have to keep these two headers for it to be cached by my CDN
> provider.
Content-length shouldn't affect cacheability. If you're sure it does,
you might consider a bug report to whoever is responsible.
> 4. No fun of using XbiHack cause every other html is having ssi.
What's wrong with xbithack? Just scope it where you want it.
> Does it make sense to calculate these two headers and then insert
> both headers in some kind of output filter ?
Yes, you'd need to compute content-length in an output filter.
And it would need to buffer your output, which makes for a huge
performance hit if you're serving big documents.
--
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org