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 #106 of 117 |
Re: [http-compliance] Re: HTTP/1.1 Conditional GET


On Wed, 4 Jun 2003, chris_pressey wrote:

> 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

Except for
If-Match: *

> - any request with only If-None-Match will never return 412

Except for
If-None-Match: *
especially for non-GET/HEAD methods.

> ...since a client which sends my server any entity tags is obviously
> confused (since it couldn't have got them from my server! :)

In general, your server may be serving content that was previously
served by an ETag-generating server, explaining now-stale e-tags in
request headers; so the client is not necessarily "confused". The "*"
case is used to make PUTs and such safer.

Also be careful with If-Range if you are going to support ranges,
because If-Range can use HTTP-date as a validator (section 14.27) so
you cannot ignore it even if you generate no entity-tags.

> 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.

The logic behind all If-* headers is not that complex after you digest
RFC wording into something more systematic/algorithmic (which may take
days). The core of it can be expressed in less than 100 lines of code.
Nevertheless, if you can bypass all e-tag operations, your code will
be simpler, of course.

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

Generating ETags is optional.

Alex.

--
| HTTP performance - Web Polygraph benchmark
www.measurement-factory.com | HTTP compliance+ - Co-Advisor test suite
| all of the above - PolyBox appliance



Wed Jun 4, 2003 10:33 pm

rousskov@...
Send Email Send Email

Forward
Message #106 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