[英]Apache reverse proxy content-length
All, 所有,
I almost successfully implemented a parser on Apache/2.2.15, see part of my virtual host config included. 我几乎成功地在Apache / 2.2.15上实现了解析器,请参见我的虚拟主机配置中的一部分。
Problem I still encounter is when is perform a get to the two urls included 我仍然遇到的问题是何时执行对包含的两个URL的获取
"GET /html/js/everything.jsp?browserId=ie&themeId=newTangoModuleTheme_WAR_newTangoModuleTheme&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&languageId=fr_FR&b=6120&t=1364288620000 HTTP/1.1" 200 1001584 “ GET /html/js/everything.jsp?browserId=ie&themeId=newTangoModuleTheme_WAR_newTangoModuleTheme&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&languageId=fr_FR&b=6120&t=1364288620000
"GET /html/js/everything.jsp?browserId=ie&themeId=classic&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&languageId=fr_FR&b=6120&t=1364288620000 HTTP/1.1" 200 1001584 “ GET /html/js/everything.jsp?browserId=ie&themeId=classic&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&languageId=fr_FR&b=6120&t=1364288620000 HTTP / 1.1” 200 1001584
I always receive a conten-length mismatch of two bytes, response header indicates 1001582 but server returns 1001584, as a consequence page is not loaded properly. 我总是收到两个字节的内容长度不匹配的消息,响应标头指示1001582,但服务器返回1001584,因此未正确加载页面。
All information is more then welcome. 欢迎您提供所有信息。
FYI- other js and css pages are rendered correctly only the two jsp pages provide problems !!! 仅供参考-其他js和css页面正确呈现,只有两个jsp页面提供了问题!
<VirtualHost ip address>
KeepAlive On
RewriteEngine on
RewriteLogLevel 4
RewriteLog /tmp/rewrite.log
AddDefaultCharset UTF-8
ProxyPreserveHost On
ProxyRequests Off
ProxyHTMLLogVerbose On
LogLevel Debug
ServerName srvname
# load additional modules to adjust responses
LoadFile /usr/lib64/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
# Hacked by KR in order to allow full content parsing
RequestHeader unset Accept-Encoding
# Amigo here's the declaration for W3C HTML 4.01 and XHTML 1.0
ProxyHTMLLinks a href
ProxyHTMLLinks area href
ProxyHTMLLinks link href
ProxyHTMLLinks img src longdesc usemap
ProxyHTMLLinks object classid codebase data usemap
ProxyHTMLLinks q cite
ProxyHTMLLinks blockquote cite
ProxyHTMLLinks ins cite
ProxyHTMLLinks del cite
ProxyHTMLLinks form action
ProxyHTMLLinks input src usemap
ProxyHTMLLinks head profile
ProxyHTMLLinks base href
ProxyHTMLLinks script src for
ProxyHTMLLinks frame src longdesc
ProxyHTMLLinks iframe src longdesc
ProxyHTMLLinks body background
ProxyHTMLLinks applet codebase
ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \
onmouseover onmousemove onmouseout onkeypress \
onkeydown onkeyup onfocus onblur onload \
onunload onsubmit onreset onselect onchange
ProxyHTMLEnable On
#ProxyHTMLExtended On
#ProxyHTMLMeta On
ProxyHTMLURLMap https://www.site1.be
ProxyHTMLURLMap http://www.site2.be
</VirtualHost>
Regards, 问候,
Ken 肯
I was having some issues with the Content-Length
header being incorrectly set when ProxyHTMLEnable On
was set. 设置
ProxyHTMLEnable On
时, Content-Length
标头设置不正确时ProxyHTMLEnable On
一些问题。 What corrected the problem for me was including proxy-html
at an appropriate point the output filter list. 对我而言,解决此问题的方法是在适当的时候将
proxy-html
包括在输出过滤器列表中。 In my case I was using some other filters you may or may not be using, and the line in the Apache configuration file was: 就我而言,我使用的是您可能会或可能不会使用的其他过滤器,并且Apache配置文件中的行是:
SetOutputFilter INFLATE;proxy-html;SUBSTITUTE;DEFLATE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.