couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Blakey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-4) Use HTTP Etags for cache support
Date Fri, 23 Jan 2009 22:31:59 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666757#action_12666757
] 

Antony Blakey commented on COUCHDB-4:
-------------------------------------

This wouldn't be theoretically secure unless the etag include a UUID for the database, assigned
when a database is created. That's the equivalent of a _rev for the database.

I wonder about the guarantee on _revs: If I delete a document and then recreate it, is there
any possibility of a 'reuse' of _rev? I would have hoped not. In which case, is that uniqueness
scoped to the database or is it universal? This affects my first point.

> Use HTTP Etags for cache support
> --------------------------------
>
>                 Key: COUCHDB-4
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-4
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>            Reporter: Noah Slater
>            Assignee: Chris Anderson
>            Priority: Blocker
>             Fix For: 0.9
>
>
> CouchDb currently puts a number of headers in HTTP responses that disable
> any caching. However, the docid and rev that are part of every document
> would make it extremely easy to instead generate solid Etag headers, and
> then return 204 Not Modified responses for GET and HEAD requests if the
> client sends along the most current Etag value.
> For example, instead of:
> HTTP/1.1 200 OK
> Server: inets/develop
> Date: Sat, 15 Sep 2007 11:21:41 GMT
> Cache-Control: no-cache
> Pragma: no-cache
> Expires: Sat, 15 Sep 2007 11:21:41 GMT
> CouchDB should return something like:
> HTTP/1.1 200 OK
> Server: inets/develop
> Date: Sat, 15 Sep 2007 11:21:41 GMT
> Cache-Control: must-revalidate
> Etag: ${docid}@${rev}
> Sufficiently sophisticated clients (such as Python httplib2) could then use
> If-None-Match to perform conditional GET requests.
> Thinking about it again, as the docid is already in the URL, only the rev
> is needed in the Etag headers.
> --
> Comment 1 by cml...@gmx.de, Oct 01, 2007
> See also http://intertwingly.net/blog/2007/09/24/Tests-Id-Like-CouchDB-to-Pass#etag

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message