android Volley: [461] BasicNetwork.performRequest: Unexpected response code 400 for xxxxx

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013125680/article/details/55806048

后台崩溃异常

 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:235)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1000)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722)

出现这个问题应该是Tomcat问题,我查阅了资料说是字节编码问题,


所以我android传递参数,就需要转码了再传递给后台,

String value =URLEncoder.encode("啦啦啦", “utf-8”); 

阅读更多
换一批

没有更多推荐了,返回首页