Phi*_*hil 11 curl http-headers
我正在尝试使用 curl 发送带有自定义标头 ( curl http://example.com -H "Foo: bar")的 HTTP 请求,我发现当标头到达时,它已被 curl 小写(上面的Foo标头作为 接收foo: bar)
curl http://example.com -H "Foo: bar"
Foo
foo: bar
如何在请求中保留标头的大小写?
Phi*_*hil 11
尝试强制 curl 使用 HTTP/1.1 - 它默认为 HTTP/2,该规范规定标头必须为小写。
curl http://example.com --http1.1 -H "Foo: bar"
归档时间:
6 年,10 月 前
查看次数:
2757 次
最近记录: