gpt4 book ai didi

http - ETag 的语法?

转载 作者:可可西里 更新时间:2023-11-01 15:05:13 30 4
gpt4 key购买 nike

Redbot报告我的网页标题无效:

The ETag header's syntax isn't valid.

我的标题设置为:

ETag: 4ae413bd

为什么无效?

ETag 的语法是什么?

最佳答案

试试 ETag: "4ae413bd"。ETag 的值必须遵循 ABNF形式:

  entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string

quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">>
quoted-pair = "\" CHAR
CHAR = <any US-ASCII character (octets 0 - 127)>
TEXT = <any OCTET except CTLs, but including LWS>
OCTET = <any 8-bit sequence of data>
LWS = [CRLF] 1*( SP | HT )
CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
CRLF = CR LF
CR = <US-ASCII CR, carriage return (13)>
LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>

,基本上是 ([wW]/)?"([^"]|\\")*" regular 正则表达式。

请注意,"\""/" 都是 etag 的有效值。

引用文献:section-14.19 , section-3.11 , section-2.2 .

关于http - ETag 的语法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6719214/

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