Jean-Sebastien Delfino wrote:
Dan Becker wrote:
Here are some use cases that show how a server should respond to various PUT and GET requests with provided etags:
1) Example HTTP PUT request (new entry put, new etag responded)
User client post request
       POST /myblog/entries HTTP/1.1

Atom server response (note unique ETag)
       ETag: "e180ee84f0671b1"

2) Conditional GET example (get with etag. entry is up to date)
User client GET request
      GET /edit/first-post.atom HTTP/1.1
       If-None-Match: "e180ee84f0671b1"

Atom server response (item was up to date)
       HTTP/1.1 304 Not Modified
       Date: Sat, 24 Feb 2007 13:17:11 GMT

3) Conditional POST request (post with etag. entry provided is stale)
User client POST request
       PUT /edit/first-post.atom HTTP/1.1
       If-Match: "e180ee84f0671b1"

Atom server response (item was edited by another user)
       HTTP/1.1 412 Precondition Failed
       Date: Sat, 24 Feb 2007 16:34:11 GMT

I am by no means an expert on defining Tuscany requirements in this area, so please correct me if I am off base. I would appreciate other Tuscany users and developers views on what is needed.


The use cases look good to me. The challenge will be to find a lean programming model enabling clients/servers to consider etags or if-modified while keeping the application logic simple.

I did not mention request header fields support explicitly, but just to be sure we are all on the same page. It seems to me the gist is to support the request/response combinations of:

If-Match and If-None-Match along with ETags
If-Modified-Since and If-Unmodified-Since along with Last-Modified

At least those are the combination I intend to support with JIRA TUSCANY-2477. If there are other requests, please let me know
--
Thanks, Dan Becker

Reply via email to