Apache / Weblogic 9.2上的HTTP标头损坏

时间:2022-02-15 03:54:29

I have a very strange problem. My application stack is J2EE based and uses Spring 2.5.6 with Spring webflow 2.0.6. The app server is Weblogic 9.2 with an Apache server in front (load balancing). We use SiteMinder Webagent as the authentication layer in apache.

我有一个非常奇怪的问题。我的应用程序堆栈是基于J2EE的,并使用Spring 2.5.6和Spring webflow 2.0.6。应用服务器是Weblogic 9.2,前面有一个Apache服务器(负载平衡)。我们使用SiteMinder Webagent作为apache中的身份验证层。

The problem below could be caused by any of the layers above -

以下问题可能是由以上任何一层造成的 -

Our site performance is very slow and the reason being, certain javascript and css files are not being cached. We know that Siteminder strips away the If-Modified header so we enabled IgnoreExt parameter (in WebAgent)to add .js & .css extension to existing list of unprotected file types (without this NO JS or CSS files were cached). The problem now is that I see only 2 files not being cached (i.e. the server does not return a 304) and the reason being the response headers are corrupted. The server does return a 304 but there ae some junk text in the headers and therefore the client is not able to decide where to get the content from. It looks like this -

我们的网站性能非常慢,原因是某些javascript和css文件没有被缓存。我们知道Siteminder删除了If-Modified标头,因此我们启用了IgnoreExt参数(在WebAgent中),将.js和.css扩展名添加到现有的不受保护的文件类型列表中(没有缓存此JS或CSS文件)。现在的问题是我看到只有2个文件没有被缓存(即服务器没有返回304),原因是响应头被破坏了。服务器确实返回304,但标题中有一些垃圾文本,因此客户端无法决定从哪里获取内容。它看起来像这样 -

alt text http://img187.imageshack.us/img187/2358/dojo.gif

alt text http://img187.imageshack.us/img187/2358/dojo.gif

alt text http://img246.imageshack.us/img246/2087/tundra.gif

替代文字http://img246.imageshack.us/img246/2087/tundra.gif

Now this could be known problems with the 2 files (part of Spring Webflow) or a configuration in Apache with SiteMinder or something else entirely. Anybody ever come across this? Any idea where to start looking?

现在,这可能是2个文件(Spring Webflow的一部分)的已知问题,也可能是Apache与SiteMinder的配置或其他完全不同的问题。有人遇到过这个吗?知道从哪里开始寻找?

1 个解决方案

#1


We were having a similar situation running Apache 2.0.59 with WebLogic 10mp2. Intermittently, we would find data sitting in front of a valid HTTP response. The data was always a gzipped 0 after a 304 Not-Modified response. The corrupt header begins with the signature 1F 8B 08...

我们遇到了类似的情况,运行Apache 2.0.59和WebLogic 10mp2。间歇性地,我们会发现数据位于有效的HTTP响应之前。在304 Not-Modified响应之后,数据始终是经过gzip压缩的0。腐败的标题以签名1F 8B 08开头......

The issue seemed to stem from the use of mod_deflate with cached resources. We have been able to eliminate the issue by disabling mod_deflate. To date, we have disabled mod_deflate wholesale, but are working on narrowing down where we disable mod_deflate. The Apache WebServer project alludes to a fix in 2.1.1:

这个问题似乎源于mod_deflate与缓存资源的使用。我们已经能够通过禁用mod_deflate来消除这个问题。到目前为止,我们已禁用mod_deflate批发,但正在努力缩小我们禁用mod_deflate的位置。 Apache WebServer项目暗示了2.1.1中的修复:

*) mod_deflate: Don't deflate responses with zero length e.g. proxied 304's [Allan Edwards]

*)mod_deflate:不要缩短零长度的响应,例如代理304的[Allan Edwards]

#1


We were having a similar situation running Apache 2.0.59 with WebLogic 10mp2. Intermittently, we would find data sitting in front of a valid HTTP response. The data was always a gzipped 0 after a 304 Not-Modified response. The corrupt header begins with the signature 1F 8B 08...

我们遇到了类似的情况,运行Apache 2.0.59和WebLogic 10mp2。间歇性地,我们会发现数据位于有效的HTTP响应之前。在304 Not-Modified响应之后,数据始终是经过gzip压缩的0。腐败的标题以签名1F 8B 08开头......

The issue seemed to stem from the use of mod_deflate with cached resources. We have been able to eliminate the issue by disabling mod_deflate. To date, we have disabled mod_deflate wholesale, but are working on narrowing down where we disable mod_deflate. The Apache WebServer project alludes to a fix in 2.1.1:

这个问题似乎源于mod_deflate与缓存资源的使用。我们已经能够通过禁用mod_deflate来消除这个问题。到目前为止,我们已禁用mod_deflate批发,但正在努力缩小我们禁用mod_deflate的位置。 Apache WebServer项目暗示了2.1.1中的修复:

*) mod_deflate: Don't deflate responses with zero length e.g. proxied 304's [Allan Edwards]

*)mod_deflate:不要缩短零长度的响应,例如代理304的[Allan Edwards]