Hi,
I'm writing a minimal HTTP/1.1 origin server and I'm striving for
conditional compliance.
I have a couple of newbie questions about whether Conditional GET
(and Partial GET) are required or merely recommended.
5.1.1 of RFC 2616 says:
"...if the above methods are implemented, they MUST be implemented
with the same semantics as those specified in section 9."
While 9.3 says:
"The semantics of the GET method change to a "conditional GET" if the
request message includes an If-Modified-Since, If-Unmodified-Since,
If-Match, If-None-Match, or If-Range header field. A conditional GET
method requests that the entity be transferred only under the
circumstances described by the conditional header field(s)."
This implies to me that HTTP/1.1 origin servers MUST implement
Conditional GET.
However, 3.3.1 states:
"HTTP/1.1 clients and servers that parse the date value MUST accept
all three formats..."
This implies to me that there can be HTTP/1.1 origin servers that do
not parse dates, and, since parsing dates is required for Conditional
GET, implies that they do not support Conditional GET.
Similarly for Partial GET, 9.3 says:
"The semantics of the GET method change to a "partial GET" if the
request message includes a Range header field."
Whereas 14.35.2 says:
"A server MAY ignore the Range header."
At the moment I figure I've misinterpreted "the above methods" in
5.1.1 to mean all methods, when it really means all methods except
GET and HEAD - but I'd like confirmation on this.
Also - if Conditional GET and Partial GET are indeed optional, what
is the most graceful way to handle these requests: just ignore the
If-Match, Range, etc. headers and respond as if it were a plain GET?
Thanks in advance,
-Chris