gpt4 book ai didi

c - GET 请求 header 字段和值是否区分大小写?

转载 作者:太空宇宙 更新时间:2023-11-04 05:46:22 31 4
gpt4 key购买 nike

我正在处理有关使用 GET 请求的编程作业。我正在使用 C。

请问GET包的headers字段和值是否必须大写?

例如:

GET / HTTP/1.1
Connection: Keep-Alive

对比

get / HTTP/1.1
connection: keep-alive

最佳答案

HTTP 方法名称是 case-sensitive :

The Method token indicates the method to be performed on the resource identified by the Request-URI. The method is case-sensitive.

HTTP header 名称是 case-insensitive .

关于c - GET 请求 header 字段和值是否区分大小写?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4159854/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com