解析HTTP请求标头时出错 [英] Error parsing HTTP request header

查看:312
本文介绍了解析HTTP请求标头时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从浏览器向我的服务器(本地主机)发送 POST 请求。我的请求网址是:

I am trying to send a POST request from browser to my server(local host). My request URL is :

 http://localhost:8080/myPath/myServlet?requestData={  .......//Json String......};

requestData 是一个json字符串(我是使用GSON达到目的。)一切正常,直到json字符串中的数据超过特定限制。说,我在json字符串中发送对象数组。如果列表中的对象数超过 67 ,则会出现以下错误:

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.

感谢。

推荐答案

我有一个类似的问题,我发送了一个POST请求(使用Firefox的RESTClient插件)请求正文中的数据并且收到了相同的消息。

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.

在我的情况下,这是因为我试图在未配置HTTPS的本地tomcat实例中使​​用HTTPS协议。

In my case this happened because I was trying to use HTTPS protocol in a local tomcat instance where HTTPS was not configured.

这篇关于解析HTTP请求标头时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆