Invalid character found in method name. HTTP method names must be tokens

 

o.apache.coyote.http11.Http11Processor   : Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:422)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:683)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

阿里云上弄了一个tomcat,经常半夜发送崩溃,查看日志发现这个东西,查阅资料发现是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="你想要的大小"/>
如:
   <Connector port="8080" executor="tomcatThreadPool"
     protocol="HTTP/1.1"
     maxThreads="1000"
     maxHttpHeaderSize="8192"
     minSpareThreads="100"
     maxSpareThreads="200"
     acceptCount="1000"
     maxConnections="1000"
     connectionTimeout="30000"
     keepAliveTimeout="15000"
     maxKeepAliveRequests="1"
      tcpNoDelay="true"
     redirectPort="8443"
     enableLookups="false"
     URIEncoding="UTF-8"/>

http://www.cnblogs.com/yuananyun/p/6501324.html

时间: 2024-08-05 13:44:31

Invalid character found in method name. HTTP method names must be tokens的相关文章

异常解决:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

前言: 在用IE浏览器时访问tomcat项目时,页面报400错误,后台错误: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 在网上查得资料时因为Tomcat版本在7以后会对http请求进行验证 解决办法: 1.使用encodeURI函数,因为IE浏览器无法对URL

ant导入Zookeeper到Eclipse错误path contains invalid character

首先在Zookeeper源码目录执行 ant eclipse 遇到错误 path contains invalid character 可以修改\zookeeper\build.xml 文件加入 <property name="ivy.default.ivy.user.dir" value="f:/antlvy"/> 另外可能出现不能switch enum的错误.尝试多切换几次jdk. build path->libraries->Add l

Python OOP(2)-static method,class method and instance method

静态方法(Static Method): 一种简单函数,符合以下要求: 1.嵌套在类中. 2.没有self参数. 特点: 1.类调用.实例调用,静态方法都不会接受自动的self参数. 2.会记录所有实例的信息,而不是为实例提供行为. 简单说staticmethod 无法访问类属性.实例属性,相当于一个相对独立的方法,跟类其实没什么关系,换个角度来讲,其实就是放在一个类的作用域里的函数而已. #!python2 #-*- coding:utf-8 -*- class A: v1="class ar

The filename 未命名.ipa in the package contains an invalid character(s).

The filename 未命名.ipa in the package contains an invalid character(s).  The valid characters are: A-Z, a-z, 0-9, dash, period, underscore, but the name cannot start with a dash, period, or underscore 把ipa的名字换成中文就OK了,就这么简单.

java代码中init method和destroy method的三种使用方式

在java的实际开发过程中,我们可能常常需要使用到init method和destroy method,比如初始化一个对象(bean)后立即初始化(加载)一些数据,在销毁一个对象之前进行垃圾回收等等. 周末对这两个方法进行了一点学习和整理,倒也不是专门为了这两个方法,而是在巩固spring相关知识的时候提到了,然后感觉自己并不是很熟悉这个,便好好的了解一下. 根据特意的去了解后,发现实际上可以有三种方式来实现init method和destroy method. 要用这两个方法,自然先要知道这两

cookie设置日期时间有空格报错:java.lang.IllegalArgumentException: An invalid character [32] was present in the Cookie value

rt,代码及报错如下: java.lang.IllegalArgumentException: An invalid character [32] was present in the Cookie value 现暂时将"yyyy-MM-dd hh:mm:ss"中的空格用#替代,就能正常显示时间日期了...

Asp.Net 使用System.Data.OracleClient 连接oralce中文乱码以及sql含中文别名出现ORA-00911:Invalid character解决办法

不需要去修改oracle以及client的字符集,只需要在web.config中连接字符串上加上 Unicode=True 问题解决. <add key="connstring" value="Data Source=orcl;user id=username;password=password;Unicode=True"/> <add name="ConnectionString" connectionString="

An invalid character [32] was present in the Cookie value

HTTP Status 500 – Internal Server Error Type Exception Report Message An invalid character [32] was present in the Cookie value Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception java.l

Golden32 别名时中文 报ORA-00911: invalid character错误

查询数据库软件我一般用两个:PL SQL和golden32:使用golden32-之前使用的时候别名为中文是没有任何问题:直到我想将PL SQL汉化(使用中文包chinese.exe),汉化完后再次查询语句就变成报错“ORA-00911: invalid character”:之后搜索了很多网页来解决这个问题,但是大多数是指标点符号的问题: 后来在这个网址找到问题的解决方案:http://blog.csdn.net/iloli/article/details/7766563: 通过添加系统变量来