haproxy1.5.15代理下,使用IE访问url里传输中文参数时错误解决办法.

简介:

 最近把公司的haproxy1.4.18升级到了1.5.15,安全规则更多更灵活.

但是今天发现一个新问题,就是用IE浏览器访问公司网站的时候,凡是url传输中文参数时,就返回"该网页无法显示,请检查网络或dns".用火狐,谷歌浏览器都没有问题.

例如:

http://mydomain?=中国

 

实际上这IE的一个bug,一些典型的非US-ASCII编码的头名会被过滤掉.技术支持还是蛮好的.说是很快就有1.5.16后续版本来解决问题,

 

解决办法:

1,回到1.4的稳定版.

但是部分好用的安全规则在1.4无法启用.

2,在lisent应用组里加入"option accept-invalid-http-request",重启haproxy即可.

3,等待更新的版本.

以下是原haproxy开发者回复的邮件内容:

 

OK I could reproduce it, this is always the same MSIE bug, it forgets
to correctly encode data in the query string :

You can see them by issuing "show errors" on the stats socket :

As you can see, it is sending raw bytes in the request, which is strictly
forbidden in HTTP. Note that if my memory serves me right, it does not
decide to do this by itself, it just replays what the application sent
to it, so it is possible that your application forgets to correctly url-
encode the field in a url that was produced.

While you're investigating, you can bypass the issue by using :

  option accept-invalid-http-request

Note, I am seeing that the request is now blocked upstream so I'm assuming
you're running the same version on your production servers and that it
rejected the request too.

So please use the option above, it works around the MSIE bug.

Regards,
Willy

 

信2,

OK. There were several bugs fixed since 1.5-dev15, you should upgrade to

the latest snapshot on the website to keep safe. I intend to release dev16

today, so you can also wait a few hours. But I would feel better if you

would at least upgrade to one of these versions.


本文转自 idyllic_cyty 51CTO博客,原文链接:http://blog.51cto.com/aizzw/1098336


相关文章
|
安全 Shell
关于双击桌面上的IE图标却显示“打开方式”对话框的解决办法
关于双击桌面上的IE图标却显示“打开方式”对话框的解决办法
Edge——如何打开IE浏览器进行访问
Edge——如何打开IE浏览器进行访问
241 4
|
安全 网络安全
用IE浏览器访问网站提示证书错误
当你在Internet Explorer中遇到证书错误提示,通常是因网站SSL/TLS证书问题或浏览器安全设置需调整。解决方法包括: 检查时间设置 调整IE设置 安装证书 调整计算机时间
1501 3
|
前端开发 JavaScript
前端JS截取url上的参数
文章介绍了两种前端JS获取URL参数的方法:手动截取封装和使用URLSearchParams。
484 0
|
开发框架 前端开发 .NET
Asp.net Webapi 的 Post 方法不能把参数加到 URL 中?试试这样写
Asp.net Webapi 的 Post 方法不能把参数加到 URL 中?试试这样写
316 0
|
Java
JAVA 获取 URL 指定参数的值
JAVA 获取 URL 指定参数的值
254 0
|
JavaScript 前端开发 数据格式
URL编码【详解】——Javascript对URL进行编码解码的三种方式的区别和使用场景,axios请求拦截器中对get请求的参数全部进行URL编码
URL编码【详解】——Javascript对URL进行编码解码的三种方式的区别和使用场景,axios请求拦截器中对get请求的参数全部进行URL编码
1077 0
|
JavaScript
js 获取并解析 url 中参数的三种方法
js 获取并解析 url 中参数的三种方法
2796 0
|
文字识别 算法 API
视觉智能开放平台产品使用合集之在调用接口传入的图片URL参数,文件在本地或者非上海地域OSS链接,该怎么办
视觉智能开放平台是指提供一系列基于视觉识别技术的API和服务的平台,这些服务通常包括图像识别、人脸识别、物体检测、文字识别、场景理解等。企业或开发者可以通过调用这些API,快速将视觉智能功能集成到自己的应用或服务中,而无需从零开始研发相关算法和技术。以下是一些常见的视觉智能开放平台产品及其应用场景的概览。
194 0
|
Web App开发 移动开发 安全
如何做到修改 url 参数页面不刷新
如何做到修改 url 参数页面不刷新