Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day368:说一下你对 Get 请求传参长度限制的理解? #1202

Open
Genzhen opened this issue Aug 18, 2021 · 0 comments
Open

Day368:说一下你对 Get 请求传参长度限制的理解? #1202

Genzhen opened this issue Aug 18, 2021 · 0 comments
Labels
网络&安全 teach_tag

Comments

@Genzhen
Copy link
Collaborator

Genzhen commented Aug 18, 2021

每日一题会在下午四点在交流群集中讨论,五点小程序中更新答案
欢迎大家在下方发表自己的优质见解

二维码加载失败可点击 小程序二维码

扫描下方二维码,收藏关注,及时获取答案以及详细解析,同时可解锁800+道前端面试题。


误区

我们经常说 Get 请求参数的大小存在限制,而 Post 请求的参数大小是无限制的。

实际上 HTTP 协议从未规定 GET/POST 的请求长度限制是多少。对 Get 请求参数的限制是来源与浏览器或 web 服务器,浏览器或 web 服务器限制了 url 的长度。为了明确这个概念,我们必须再次强调下面几点:

  1. HTTP 协议未规定 GET 和 POST 的长度限制
  2. GET 的最大长度显示是因为浏览器和 web 服务器限制了 URI 的长度
  3. 不同的浏览器和 WEB 服务器,限制的最大长度不一样
  4. 要支持 IE,则最大长度为 2083byte,若只支持 Chrome,则最大长度 8182byte
@Genzhen Genzhen added the 网络&安全 teach_tag label Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
网络&安全 teach_tag
Projects
None yet
Development

No branches or pull requests

1 participant