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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

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

Hello again,

--- Alex Rousskov <rousskov@...> wrote:
> The logic behind all If-* headers is not that complex after you
> digest RFC wording into something more systematic/algorithmic
> (which may take days).

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 absolutely minimal logic for an
origin server reacting to If-* headers that remains conditionally
compliant with RFC 2616, but I would appreciate a sanity check.

The pseudocode is:


if If-Match is present and it is not "*"
respond with 412 Precondition Failed
if If-None-Match is "*"
begin
if the request method is neither "GET" nor "HEAD"
respond with 412 Precondition Failed
if neither If-Modified-Since nor If-Unmodified-Since is present
respond with 501 Not Implemented
end
otherwise respond with the requested resource


I fully admit that the primary goal is for the code to be
minimal; specifically, I don't want to have code to parse
the date, and I want the set of possible responses to be as
small as possible. I realize the 501 Not Implemented is a
bit "rude", but it doesn't appear to be in violation of
RFC 2616; the important part seems to be that I MUST NOT
serve the requested resource if If-None-Match matches
(i.e. in my ETag-less case, if it'd "*") in the absence of
If-[Un]modified-Since headers.

Unless I have missed something?

Thanks in advance for any help.

-Chris

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca



Wed Oct 1, 2003 5:25 am

chris_pressey
Offline Offline
Send Email Send Email

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