Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors
Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG leveltomcat
在寫APP接口時候 接收手機端提交的base64數據,致使出現上面的錯誤,緣由是數據量過大致使的,安全
網上的方法是在server.xml端口配置那增長 maxPostSize="0" maxHttpHeaderSize ="1002400",maxPostSize="0" 表示不限制,7版本之後是用maxPostSize="-1" ,我試了幾回都沒有用還把後臺登陸post提交攔截了xss
直接寫成 maxPostSize="1002400" maxHttpHeaderSize ="1002400",post
把catalin.properties中在增長不過濾特殊符號優化
#對request的長度進行優化 base64
tomcat.util.http.parser.http.parser.HttpParser.requestTargetAllow=|{} 加密
這樣就解決問題了server
其實安全考慮tomcat.util.http.parser.http.parser.HttpParser.requestTargetAllow=|{} 這裏是容許特殊符號URL提交,安全考慮最好不要加這個 由於容易xss,只修改數據提交大小限制,把base64加密提交就沒有特殊符號了xml