Is there a limit to the length of a GET request?

This question already has an answer here:

  • maximum length of HTTP GET request? 7 answers

  • Not in the RFC, no, but there are practical limits.

    The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).

    Note: Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.


    This article sums it up pretty well

    Summary: It's implementation dependent, as there is no specified limit in the RFC. It'd be safe to use up to 2000 characters (IE's limit.) If you are anywhere near this length, you should make sure you really need URIs that long, maybe an alternative design could get around that.

    URIs should be readable, even when used to send data.


    The specification does not limit the length of an HTTP Get request but the different browsers implement their own limitations. For example Internet Explorer has a limitation implemented at 2083 characters.

    链接地址: http://www.djcxy.com/p/71368.html

    上一篇: 中的URL参数的最大大小

    下一篇: GET请求的长度是否有限制?