couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2568) CouchDB 2.0 /_all_docs does not return full attachment data with keys=["somekey"]&attachments=true
Date Wed, 11 Feb 2015 09:57:11 GMT

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

ASF GitHub Bot commented on COUCHDB-2568:
-----------------------------------------

Github user willholley commented on the pull request:

    https://github.com/apache/couchdb-fabric/pull/13#issuecomment-73856750
  
    Is somebody able to review this? It would make another swath of PouchDB tests happy if
we can get COUCHDB-2568 fixed :)


> CouchDB 2.0 /_all_docs does not return full attachment data with keys=["somekey"]&attachments=true
> --------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-2568
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2568
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: Will Holley
>
> Similar to case COUCHDB-2522, in CouchDB 1.6, '/_all_docs'?keys=["somekey"]&include_docs=true&attachments=true'
returns the full attachment data. In the clustered CouchDB 2.0 interface, the attachments
query parameter is ignored.
> In CouchDB 1.6:
> {code}
> ~$ curl -X PUT http://127.0.0.1:5984/test
> {"ok":true}
> ~$ curl -X POST http://127.0.0.1:5984/test -H 'Content-type:application/json' -d '{ "_id":
"foo", "_attachments": { "bar.txt": {"content_type": "text/plain","data": "holy moly"} } }'
> {"ok":true,"id":"foo","rev":"1-b4adf85456c3026765ddee2d36c3814f"}
> ~$ curl -g 'http://127.0.0.1:5984/test/_all_docs?keys=["foo"]&include_docs=true&attachments=true'
> {"total_rows":1,"offset":0,"rows":[
> {"id":"foo","key":"foo","value":{"rev":"1-b4adf85456c3026765ddee2d36c3814f"},"doc":{"_id":"foo","_rev":"1-b4adf85456c3026765ddee2d36c3814f","_attachments":{"bar.txt":{"content_type":"text/plain","revpos":1,"digest":"md5-iRNdzYnZ/dk8u44XAJXaAQ==","data":"holymoly"}}}}
> ]}
> {code}
> In CouchDB 2.0:
> {code}
> ~$ curl -X PUT http://127.0.0.1:15984/test
> {"ok":true}
> ~$ curl -X POST http://127.0.0.1:15984/test -H 'Content-type:application/json' -d '{
"_id": "foo", "_attachments": { "bar.txt": {"content_type": "text/plain","data": "holy moly"}
} }'
> {"ok":true,"id":"foo","rev":"1-b4adf85456c3026765ddee2d36c3814f"}
> ~$ curl -g 'http://127.0.0.1:15984/test/_all_docs?keys=["foo"]&include_docs=true&attachments=true'
> {"total_rows":1,"rows":[
> {"id":"foo","key":"foo","value":{"rev":"1-b4adf85456c3026765ddee2d36c3814f"},"doc":{"_id":"foo","_rev":"1-b4adf85456c3026765ddee2d36c3814f","_attachments":{"bar.txt":{"content_type":"text/plain","revpos":1,"digest":"md5-iRNdzYnZ/dk8u44XAJXaAQ==","length":6,"stub":true}}}}
> ]}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message