Reputation: 3064
According to rfc2616 in the section 3.11 the format of entity tag is the following:
entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string
And in the examples given for the condition "If-match" in section 14.24 in rfc2616 are the following:
If-Match: "xyzzy"
If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-Match: *
I'm doing a project in c, where I'll parse the http requests from different clients. The web server is also written c, and from the webserver I can get the request headers and values as const char*
and I parse them. But my confusion is that where the value in the header "If-match"
will be similar to "xyzzy, r2d2xxxx ,c3piozzzz"
or will it be similar to ""xyzzy", "r2d2xxxx", "c3piozzzz""
? Do you know which one is right? And will there surely be space between each etags in the If-Match header value if it has a list of entities? I mean will the format be the following type?
If-Match: "one-entity-tag",[space]"second-entity-tag",[space]"third-entity-tag"
There is no description of the format of the If-Match header value if it has a list of etags. rfc2616 only gives an example(which I showed above) of it. Is that example reliable?
Upvotes: 0
Views: 198
Reputation: 42065
You can trust the spec and the examples: the double quote is really part of the ETag.
Upvotes: 1