开发者

How large can a HTTP form parameter string be?

How large can a HTTP form parameter string be?

If I want to pass sa开发者_如何学Goy a couple of pages worth of XML will a form parameter be ok? Or if not would I need to treat it as a file upload to be sure?

Thanks


Assuming you're sending the content via POST, rather than as part of the querystring in GET, there's no universal limit. Some servers may constrain POST requests to some specific size to reduce the risk of denial of service requests, but those limits are likely to be in 1-8 megabyte range on most server configurations.

As a developer, you'll probably be able to configure that limit if there is one; in Rails, the mechanism depends on what HTTP application server you're using. Mongrel sets it in a Const::MAX_BODY, I think.

File Upload is just a specially encoded POST request, so it won't have much effect on limits, if any.


If you're passing them in via that POST method, there is no limit.

If you're passing them in via a GET request, then the limit varies depending on the browser, proxy software, web server, and so on; you generally should make sure that you have less than 2000 characters in your URL as a whole, to be on the safe side (IE has a limit of 2048 characters in the path portion of the URL).


There is definitely a limit, both on client and server.

Limits are imposed by web browser

Maximum URL length is 2,083 characters in Internet Explorer

http://support.microsoft.com/kb/208427/en-us

In IIS Web Server default limit is 16,384 characters See MaxFieldLength: http://support.microsoft.com/kb/820129/en-us

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜