Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.0.2
-
None
-
None
-
Linux
Description
Had this problem during a couchdb training.
[thomas@otto ~]$ curl -X GET http://localhost:5984/bank/_all_docs{"total_rows":5,"offset":0,"rows":[
{"id":"fe4a1382596a9071d66412f9f100183c","key":"fe4a1382596a9071d66412f9f100183c","value":{"rev":"1-1e3f1ca41010f7cc641337fa3ea88593"}},
{"id":"fe4a1382596a9071d66412f9f1001c67","key":"fe4a1382596a9071d66412f9f1001c67","value":{"rev":"1-ea8b064f341943d19776e63201b6d0c4"}},
{"id":"fe4a1382596a9071d66412f9f1002209","key":"fe4a1382596a9071d66412f9f1002209","value":{"rev":"1-1c8d66f0baf7b022a63d62b99db5f133"}},
{"id":"fe4a1382596a9071d66412f9f1002da8","key":"fe4a1382596a9071d66412f9f1002da8","value":{"rev":"2-2d03d5121b4df02423cece5432de16cc"}},
{"id":"fe4a1382596a9071d66412f9f100388a","key":"fe4a1382596a9071d66412f9f100388a","value":{"rev":"1-e194aaf299e9ac452d2db072584271f6"}}
]}
[thomas@otto ~]$ curl -X PUT -H "Content-Type:image/jpeg" "http://localhost:5984/bank/fe4a1382596a9071d66412f9f100183c/picture.jpg?rev=2-2d03d5121b4df02423cece5432de16cc" --data-binary @ik/thomasvs.jpg
{"error":"
","reason":"
{2,<<45,3,213,18,27,77,240,36,35,206,206,84,50,222,22,204>>}"}
[thomas@otto ~]$ curl -X PUT -H "Content-Type:image/jpeg" "http://localhost:5984/bank/fe4a1382596a9071d66412f9f100183c/picture.jpg?rev=1-1e3f1ca41010f7cc641337fa3ea88593" --data-binary @ik/thomasvs.jpg
The second command (first put) gives an unreadable reason. The reason is I supplied a non-existing revid for that doc.