您的位置:首页 > 理论基础 > 计算机网络

Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors

2017-05-26 14:19 525 查看
tomcat进行http request解析的时候报错,并将错误返回给客户端了,具体的错误如下:org.apache.coyote.http11.AbstractHttp11Processor.processError parsing HTTP request headerNote:further occurrences of HTTP header parsing errors will be logged at DEBUG level.
就会报iib.requestheadertoolarge.error即Request header is too large,在网上搜索时,有的是因为这个设置导致的400,解决方法就是修改Tomcat的server.xml,在<Connectorport="8080"protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" />的配置中增加maxHttpHeaderSize的配置。
   <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="8192" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation that requires the JSSE
         style configuration. When using the APR/native implementation, the
         OpenSSL style configuration is required as described in the APR/native
         documentation -->
    
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" keystoreFile="C:/Users/Administrator/.keystore" keystorePass="123456"/>
    
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐