incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Fisher (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-1210) files starting with underscore can be attached but not updated
Date Fri, 01 Jul 2011 22:09:28 GMT
files starting with underscore can be attached but not updated
--------------------------------------------------------------

                 Key: COUCHDB-1210
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1210
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 1.1
         Environment: OSX 10.6 with CouchDB via Brew
            Reporter: Nick Fisher


Files that have a name starting with a leading underscore (EG '_foo.txt') can be attached
to a document when it is created, but not when it it updated. I assume that the create that
allows the underscore is in error from what I read here:
https://github.com/apache/couchdb/blob/trunk/share/www/script/test/attachment_names.js#L77

Example:

$ curl -X POST http://localhost:5984/testdb -H "Content-Type: application/json" -d '{ "_id":
"testing_doc", "_attachments": { "_id": { "data": "X2Rlc2lnbi9jb25hbgo=", "content_type":
"application/octet-stream" } } }'

{"ok":true,"id":"testing_doc","rev":"1-86408f7d442563ec03ffb57c0226ccec"}

$ curl -X PUT http://localhost:5984/conan/testing_doc -H "Content-Type: application/json"
-d '{ "_id": "testing_doc", "rev":"1-86408f7d442563ec03ffb57c0226ccec", "_attachments": {
"_id": { "data": "X2Rlc2lnbi9jb25hbgo=", "content_type": "application/octet-stream" } } }'

{"error":"bad_request","reason":"Attachment name can't start with '_'"}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message