[Java Web]Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors

手機客戶端向服務器提交Http請求時,Tomcat拋出錯誤:html

十二月 31, 2014 2:32:45 下午 org.apache.coyote.http11.AbstractHttp11Processor process
信息: Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.apache

通過調試後發現是Tomcat的header緩衝區大小不夠,只須要在server.xml中增長maxHttpHeaderSize字段便可:服務器

 

<Connector URIEncoding="UTF-8" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
	useBodyEncodingForURI="false"
	enableLookups="false"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="你想要的大小"/>

 

 

不過使用Web提交就不會出現這種問題,即便手機端再三強調使用的是Post方式,仍懷疑是由於使用的Get致使Header數據過長.調試

相關文章
相關標籤/搜索