From dev-return-17011-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Fri Jul 1 22:09:52 2011 Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 810A14394 for ; Fri, 1 Jul 2011 22:09:52 +0000 (UTC) Received: (qmail 96598 invoked by uid 500); 1 Jul 2011 22:09:51 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 96315 invoked by uid 500); 1 Jul 2011 22:09:50 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 96267 invoked by uid 99); 1 Jul 2011 22:09:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2011 22:09:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2011 22:09:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C6F3643F087 for ; Fri, 1 Jul 2011 22:09:28 +0000 (UTC) Date: Fri, 1 Jul 2011 22:09:28 +0000 (UTC) From: "Nick Fisher (JIRA)" To: dev@couchdb.apache.org Message-ID: <1529919813.9910.1309558168811.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (COUCHDB-1210) files starting with underscore can be attached but not updated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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