Search the web
Sign In
New User? Sign Up
http-compliance · discussion about HTTP compliance testing and tests
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
HTTP/1.1 Conditional GET   Message List  
Reply | Forward Message #105 of 117 |
Re: HTTP/1.1 Conditional GET

--- In http-compliance@yahoogroups.com, Alex Rousskov <rousskov@m...>
wrote:
> There is no clear/single MUST that says "the server MUST support a
> conditional or partial GET", I think. However, you may still get a
> practical answer to your questions. I would just recommend looking
at
> the problem from a different point of view:
>
> * Returning 412s for mismatched If-Match is a MUST (14.24).
> Thus, you cannot ignore If-Match.
>
> * Returning 304s for matching If-Modified-Since is a
> SHOULD (Section 14.25). Thus, you can ignore
> If-Modified-Since in this context.
>
> * Returning 200s/304s for matching If-None-Match is
> a MUST (14.26). Thus, you cannot ignore If-None-Match.
>
> * If-Range MUST be ignored if the server does not
> support the sub-range operation (14.27). Thus, you
> can ignore If-Range. (Same for Range, BTW).
>
> * Returning 412s for mismatching If-Unmodified-Since
> is a MUST (14.28). Thus, you cannot ignore
> If-Unmodified-Since.
>
> * Returning 304s for mismatching If-Modified-Since
> while other If-* headers match is a MUST NOT (13.3.4).
> Thus, you cannot ignore If-Modified-Since if other
> conditional headers are present. This rule probably
> excludes If-Range since there is a more specific
> MUST that says you can ignore it.
>
> At this point, we can conclude that you can ignore If-Range, but
must
> support/recognize/honor all other If-* headers if you want to be
> conditionally compliant in all cases. However, you can return 200 OK
> responses to matching If-Modified-Since requests as long as those
> requests do not contain other If-* headers.
>
> HTH,
>
> Alex.

Thanks for your reply.

Two of my primary design goals are conditional compliance and
simplicity, so I'd like to be able to reduce this problem to an
absolute, yet practical, minimum. This brings me to a followup
question.

I have not yet seen a clear MUST in regard to generating and sending
ETags. The closest I have seen are:

- "An entity tag MUST be unique across all versions of all entities
associated with a particular resource." (3.11)
- "Servers MUST NOT depend on clients being able to choose
deterministically between responses generated during the same second"
(13.2)

On the assumption that it is optional for an origin server to
generate ETags, would it also be acceptable to assume that:
- any request with only If-Match will always return 412
- any request with only If-None-Match will never return 412
...since a client which sends my server any entity tags is obviously
confused (since it couldn't have got them from my server! :)

If this is the case it would greatly simplify my server; I would
still have to add code to parse dates to satisfy If-Unmodified-Since
(and at that point I might as well implement If-Modified-Since too,
since it's a near-trivial variation on If-Unmodified-Since), but the
logic for handling If-[None-]Match would remain minimal.

On the other hand, if ETags are a MUST, I suppose I will have to
consider the simplest way to generate them, first.

Thanks again for your time.
-Chris





Wed Jun 4, 2003 9:34 pm

chris_pressey
Offline Offline
Send Email Send Email

Forward
Message #105 of 117 |
Expand Messages Author Sort by Date

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...
chris_pressey
Offline Send Email
Jun 3, 2003
2:10 am

... There is no clear/single MUST that says "the server MUST support a conditional or partial GET", I think. However, you may still get a practical answer to...
Alex Rousskov
rousskov@...
Send Email
Jun 3, 2003
4:58 am

... at ... must ... Thanks for your reply. Two of my primary design goals are conditional compliance and simplicity, so I'd like to be able to reduce this...
chris_pressey
Offline Send Email
Jun 4, 2003
9:34 pm

... Except for If-Match: * ... Except for If-None-Match: * especially for non-GET/HEAD methods. ... In general, your server may be serving content that was...
Alex Rousskov
rousskov@...
Send Email
Jun 4, 2003
10:33 pm

... Thanks for all the pointers. I'll make sure to include your name in the credits under "compliancy help". :) -Chris...
chris_pressey
Offline Send Email
Jun 28, 2003
6:53 pm

Hello again, ... Well, it took me a little longer than days :) (Actually, I just hadn't had time to work on it over the summer.) I think I have come up with an...
Chris Pressey
chris_pressey
Offline Send Email
Oct 1, 2003
5:25 am

... if If-Unmodified-Since is present respond with 412 Precondition Failed ... ...in other words, pessimistically assume the resource has changed. -Chris ...
Chris Pressey
chris_pressey
Offline Send Email
Oct 2, 2003
4:19 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help