URL是请求大小的一部分吗? [英] Is URL a part of request size?

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

问题描述

只是想知道URL是什么,可能会非常大( source ),被计为HTTP请求大小的一部分,因为它的值被发送到服务器(特别是查询字符串)?

Just wondering if URL, what can be very big (source), is counted as part of HTTP request size, since its values are send to server (specially with query string)?

推荐答案

是的,请求的目标是发送到服务器的消息的一部分:

Yes, the target of the request is part of the message sent to the server:

GET /hello.txt HTTP/1.1
Host: example.com
Accept: text/plain

来自 RFC 7230 ,它定义了HTTP的消息语法和路由/1.1协议:

From the RFC 7230, which defines the message syntax and routing of the HTTP/1.1 protocol:


3.1.1。请求行

请求行以方法标记开头,后跟单个空格
(SP),请求-target,另一个单一空格(SP),协议
版本,以CRLF结尾。 [...]

A request-line begins with a method token, followed by a single space (SP), the request-target, another single space (SP), the protocol version, and ends with CRLF. [...]

HTTP不会对请求行的长度设置预定义的限制[...]

HTTP does not place a predefined limit on the length of a request-line [...]

一个服务器接收的请求目标长于它希望解析的任何URI必须以 414 (URI Too Long)状态代码响应[... ]

A server that receives a request-target longer than any URI it wishes to parse MUST respond with a 414 (URI Too Long) status code [...]

在实践中可以找到各种关于请求行长度的临时限制。建议所有HTTP发件人和收件人至少支持8000个八位字节的请求行长度。

Various ad hoc limitations on request-line length are found in practice. It is RECOMMENDED that all HTTP senders and recipients support, at a minimum, request-line lengths of 8000 octets.

这篇关于URL是请求大小的一部分吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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