Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTTP头是用什么语言编写的?_Http_Httprequest - Fatal编程技术网

HTTP头是用什么语言编写的?

HTTP头是用什么语言编写的?,http,httprequest,Http,Httprequest,下面是一个HTTP头。这段代码是用什么语言或语法编写的 HTTP/2.0 200 OK Content-type: text/html Set-Cookie: yummy_cookie=choco Set-Cookie: tasty_cookie=strawberry 它不是JavaScript或PHP。这里是另一个例子,取自 它们是HTTP事实上的标准定义的一部分,编入所谓的RFC或征求意见书中。RFC是关于人们所知的互联网基础的事实标准的集合 见: 4.2消息头 HTTP标头字段,包括通用

下面是一个HTTP头。这段代码是用什么语言或语法编写的

HTTP/2.0 200 OK
Content-type: text/html
Set-Cookie: yummy_cookie=choco
Set-Cookie: tasty_cookie=strawberry
它不是JavaScript或PHP。这里是另一个例子,取自


它们是HTTP事实上的标准定义的一部分,编入所谓的RFC或征求意见书中。RFC是关于人们所知的互联网基础的事实标准的集合

见:

4.2消息头 HTTP标头字段,包括通用标头(第4.5节), 请求标头(第5.3节)、响应标头(第6.2节)和 实体标题(第7.1节)字段的通用格式与 RFC 822[9]第3.1节中给出的。每个标题字段包括 名称后跟冒号(“:”)和字段值。字段名 不区分大小写。字段值前面可以有任何金额 对于LWS,尽管首选单个SP。标题字段可以是 通过在每一额外行前面加上at扩展到多行 至少一个SP或HT。申请应遵循“通用表格”,其中 在生成HTTP构造时,一个是已知的或指示的,因为 可能存在一些无法接受任何内容的实现 超越普通形式

message-header = field-name ":" [ field-value ]
field-name     = token
field-value    = *( field-content | LWS )
field-content  = <the OCTETs making up the field-value
                 and consisting of either *TEXT or combinations
                 of token, separators, and quoted-string>
消息头=字段名“:“[字段值]
字段名=令牌
字段值=*(字段内容| LWS)
字段内容=

因此,用于描述HTTP头和cookie的语言称为RFC?@RickHelston:它们是名为“HTTP”的协议的一部分。它们本身不是一种语言,只是HTTP的一种“子语言”。HTTP的定义被编码为RFC。
message-header = field-name ":" [ field-value ]
field-name     = token
field-value    = *( field-content | LWS )
field-content  = <the OCTETs making up the field-value
                 and consisting of either *TEXT or combinations
                 of token, separators, and quoted-string>