httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: [users@httpd] Response headers set by apache
Date Sat, 30 May 2015 11:45:27 GMT
Am 30.05.2015 um 02:26 schrieb Emir Ibrahimbegovic:
> I've got an app that runs on a tomcat web server, and I use mod-jk on my
> apache web server side.
>
> I think I've managed to configure everything to work seamlessly, I ran
> into issues when I wanted to cache static assets on webserver, for some
> reason my response headers expires is set to **1994**, these are my
> headers for one of the javascript files I want to server as static asset
> and cache it:
>
>      Accept-Ranges:bytes
>      Cache-Control:no-cache
>      Connection:Keep-Alive
>      Content-Encoding:gzip
>      Content-Type:application/javascript
>      Date:Fri, 29 May 2015 23:18:25 GMT
>      ETag:W/"604348-1432950682000"
>      Expires:Thu, 01 Dec 1994 16:00:00 GMT
>      Keep-Alive:timeout=5, max=100
>      Last-Modified:Fri, 29 May 2015 23:18:25 GMT
>      Server:Apache
>      Transfer-Encoding:chunked
>      Vary:Accept-Encoding

Before trying to fix it I would first analyze, where the strange value 
comes from.

You can

- Add "&quot;%{Expires}o&quot;" to the access log valve pattern in your 
tomcat server.xml and check in the access log, whether the 1994 value is 
already being sent by your webapp.

- you can switch you JkLogLevel for a temporary test to "trace" and do a 
single request. mod_jk will log all headers it receives from Tomcat in 
its own log, so you can check which response headers arrive at the 
Apache web server.

If the wrong header originates in your webapp, first try to fix it 
there.  Only as a last resort, try to overwrite them in the web server. 
If you don't even find it among the ones that mod_jk logs, it must be 
even inside your web server or between your web server and the client. 
The Apache httpd server by itself would not use such a strange date.

You might also look for the string 786297600 somewhere in configurations 
or your webapp, because that is the seconds since the epoch that would 
result in December 1st, 1994, 16:00 GMT. Is it always exactly the same 
value?

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message