You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Kerem Güneş (JIRA)" <ji...@apache.org> on 2015/10/23 02:38:27 UTC
[jira] [Created] (COUCHDB-2860) If-Match issue on HEAD
/{db}/{docid}/{attname}
Kerem Güneş created COUCHDB-2860:
------------------------------------
Summary: If-Match issue on HEAD /{db}/{docid}/{attname}
Key: COUCHDB-2860
URL: https://issues.apache.org/jira/browse/COUCHDB-2860
Project: CouchDB
Issue Type: Bug
Security Level: public (Regular issues)
Components: HTTP Interface
Reporter: Kerem Güneş
Hi,
I suppose If-Match header omitted or ignored while requesting HEAD to an document's attachment.
Document says (http://docs.couchdb.org/en/1.5.1/api/document/attachments.html), "If-Match – Document’s revision. Alternative to rev query parameter". But, if I pass rev as If-Match header even rev is incorrect, server is sending 200 code. Besides, if I pass as query param (rev=1-NONEXISTS) server is sending 404.
Meanwhile, I am really appreciated that you did a great thing.
Thank you for CouchDB and other works.
PS: I use HTTP 1.0 cos of escaping chunked response.
Here some details:
HEAD /foo2/attc_test/attc.txt HTTP/1.0
Host: localhost:5984
Connection: close
Accept: application/json
User-Agent: Couch/v1.0 (+http://github.com/qeremy/couch)
X-HTTP-Method-Override: HEAD
If-Match: 1-NONEXISTS
HTTP/1.0 200 OK
Server: CouchDB/1.5.0 (Erlang OTP/R16B03)
ETag: "U1p5BLvdnOZVRyR6YrXBoQ=="
Date: Fri, 23 Oct 2015 00:31:05 GMT
Content-Type: text/plain
Content-Length: 19
Cache-Control: must-revalidate
Accept-Ranges: none
---
HEAD /foo2/attc_test/attc.txt?rev=1-NONEXISTS HTTP/1.0
Host: localhost:5984
Connection: close
Accept: application/json
User-Agent: Couch/v1.0 (+http://github.com/qeremy/couch)
X-HTTP-Method-Override: HEAD
HTTP/1.0 404 Object Not Found
Server: CouchDB/1.5.0 (Erlang OTP/R16B03)
Date: Fri, 23 Oct 2015 00:32:35 GMT
Content-Type: application/json
Content-Length: 41
Cache-Control: must-revalidate
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)