couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Newson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-711) missing etag header when putting standalone attachments
Date Sun, 28 Mar 2010 12:04:27 GMT

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

Robert Newson commented on COUCHDB-711:
---------------------------------------

I think it does make sense. The Etag is calculated from the document, attachments and history
of the item, so the ETag for the document will be the same value as for all of its attachments.

This patch adds consistency since you already get the Etag header in other PUT cases. With
this patch, a client can expect Etag on all responses (GET, PUT, DELETE) and all modifications
(PUT, DELETE) can supply its value in an If-Match header. 



> missing etag header when putting standalone attachments
> -------------------------------------------------------
>
>                 Key: COUCHDB-711
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-711
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 0.10.1
>            Reporter: Niko Uphoff
>         Attachments: attachments_etags.patch, etag_for_standalone_put.diff
>
>
> when putting standalone attachments there is no etag header in the response
> _________________________________________________________________
> curl -X PUT -i http://127.0.0.1:5984/test/test/attachment \
> -H 'Content-Type: text/plain' \
> --data 'some text'
> will just return
> HTTP/1.1 201 Created
> Server: CouchDB/0.10.1 (Erlang OTP/R13B)
> Location: http://127.0.0.1:5984/test/test/attachment
> Date: Fri, 26 Mar 2010 14:17:39 GMT
> Content-Type: text/plain;charset=utf-8
> Content-Length: 67
> Cache-Control: must-revalidate
> {"ok":true,"id":"test","rev":"1-3fed07956fe933df5a6dd8dd05a73ca7"}
> _________________________________________________________________

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