oreilly/couchdb-guide — Issue #459: Trailing space in code snippet breaks Attachments example
Author: therealplato
Created: 2012-02-16 19:38:06+00:00
State: open

In the Attachments section of page http://guide.couchdb.org/editions/1/en/api.html the first code snippet reads:

> curl -vX PUT http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/
artwork.jpg?rev=2-2739352689 --data-binary @artwork.jpg -H "Content-Type:
image/jpg"

The space at the end of the first line (between the ID and artwork.jpg) breaks the command. I understand the need to separate this onto multiple lines, but note that the final line **image/jpg"** does not have a trailing space, and the second line (correctly) does have a trailing space. (so it's probably not an artifact put there by the parsing code.)

I hilighted the command and noted that there was a space at the end so I figured it was supposed to be there. As someone totally new to REST it took me a while to realize that the artwork.jpg?rev=foo was actually part of the URL, not another argument to curl.

Please remove this trailing space! I searched issues for "attachment" and noticed that this was apparently fixed in the draft version, but it still appears in this 1st edition.