GET请求的长度是否有限制? [英] Is there a limit to the length of a GET request?

查看:526
本文介绍了GET请求的长度是否有限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GET请求的长度是否受到限制?

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

推荐答案

RFC ,没有,但是有实际限制.

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

HTTP协议没有对长度限制进行任何先验限制 URI.服务器必须能够处理其任何资源的URI 服务,并且应该能够处理长度不受限制的URI 提供可以生成此类URI的基于GET的表单.一台服务器 如果URI较长,则应返回414(请求URI太长)状态 超出服务器的处理能力(请参阅10.4.15节).

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).

注意:服务器应谨慎对待,具体取决于URI的长度 255字节以上,因为某些较旧的客户端或代理实现 可能无法正确支持这些长度.

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.

这篇关于GET请求的长度是否有限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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