我正在尝试从浏览器向我的服务器(本地主机)发送POST请求.我的请求网址是:
localhost:8080/myPath/myServlet?requestData={ .......//Json String......};requestData是一个json字符串(我正在使用GSON进行此操作.)一切正常,直到json字符串中的数据超过特定限制.说,我在json字符串中发送对象数组.如果列表中的对象数超过67,则出现以下错误:
AM org.apache.coyote.http11.AbstractHttp11Processor process INFO: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.为什么会这样?我很困惑.为什么会发生这种情况,需要采取什么措施来解决此问题? 我想了解其背后的原因,因为我不明白在经过特定数量的对象后,它突然停止工作,并且在控制台中出现此错误.
解决方案我遇到了类似的问题,我正在发送一个POST请求(使用Firefox的RESTClient插件),并在请求正文中添加了数据,并且收到了相同的消息. /p>
在我的情况下,这是因为我试图在未配置HTTPS的本地tomcat实例中使用HTTPS协议.
I am trying to send a POST request from browser to my server(local host). My request URL is :
localhost:8080/myPath/myServlet?requestData={ .......//Json String......};requestData is a json String (I am using GSON for the purpose.) Everything is working fine until the data in the json string exceeds a particular limit. Say, I am sending array of objects in the json string. If the number of objects in the list exceed 67 then I get following error :
AM org.apache.coyote.http11.AbstractHttp11Processor process INFO: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.Why is this so? I am totally confused. Why does this happen and what needs to be done to fix this? I want to understand the reason behind this, for I don't understand that after particular number of objects it suddenly stops working and I get this error in my console.
解决方案I had a similar issue, I was sending a POST request (using RESTClient plugin for Firefox) with data in the request body and was receiving the same message.
In my case this happened because I was trying to use HTTPS protocol in a local tomcat instance where HTTPS was not configured.
更多推荐
为什么我会收到“错误解析HTTP请求标头"消息?发布JSON字符串时?
发布评论