HttpPost不会发送一次超过一定大小的参数

时间:2021-12-12 02:23:20

Here is the code:

这是代码:

HttpClient client = new HttpClient();
PostMethod method = new PostMethod(SERVER_URL);
NameValuePair[] data = {
                new NameValuePair("html", html)
};
method.setRequestBody(data);

Once the value for the html var goes over a certain size all params become null for the receiving URL. Any ideas why?

一旦html var的值超过一定大小,所有params对于接收URL都变为null。有什么想法吗?

1 个解决方案

#1


0  

This doesn't sound like a fault on the client side. I suspect that you may be hitting a server-side limit; e.g. a request-size limit specified in the web container configuration ... or a front-end.

这听起来不像是客户端的错误。我怀疑你可能会遇到服务器端限制;例如Web容器配置中指定的请求大小限制...或前端。

#1


0  

This doesn't sound like a fault on the client side. I suspect that you may be hitting a server-side limit; e.g. a request-size limit specified in the web container configuration ... or a front-end.

这听起来不像是客户端的错误。我怀疑你可能会遇到服务器端限制;例如Web容器配置中指定的请求大小限制...或前端。