couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: Issue with null MIME type for attachments
Date Sun, 25 Jan 2009 21:11:11 GMT
On Mon, Jan 26, 2009 at 07:16:18AM +1030, Antony Blakey wrote:
>> Or indeed anything which is not a string. At the moment, arbitrary  
>> JSON
>> values are accepted, such as
>>
>>    "content_type":[{"foo":"bar"}]
>
> A bug, although I'm curious what mimetype is thereafter supplied by a  
> GET on the attachment.

The same as with "content_type":null - the entire GET fails with a "badarg".

$ curl http://127.0.0.1:5984/test_suite_db/66b7393fab5a2c1b68a6a8b007b8150d
{"_id":"66b7393fab5a2c1b68a6a8b007b8150d","_rev":"3037347223","_attachments":{"badattach.html":{"stub":true,"content_type":"image/jpeg","length":8},"foo.bin":{"stub":true,"content_type":[{"foo":"bar"}],"length":5}}}
$ curl http://127.0.0.1:5984/test_suite_db/66b7393fab5a2c1b68a6a8b007b8150d/foo.bin
{"error":"error","reason":"badarg"}

Mime
View raw message