further occurrences of HTTP header parsing errors will be logged at DEBUG level.


1.   獲取參數Json的值為null  

String json=request.getParameter("Json");

  

 

首先檢查是否有下面的東東,

 信息: Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.

  

 

如果有:說明tomcat  的head緩沖區大小不夠,在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數據過長.

 

2.  更上面解決方案一樣  maxHttpHeaderSize

org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data to the response headers than there was room available in the buffer.
Increase maxHttpHeaderSize on the connector or write less data into the response headers.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM