remove double CGI escape when PUTting an attachment

Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
This commit is contained in:
Noah Zoschke 2010-02-18 18:26:04 -08:00 committed by Marcos Tapajós
parent f16e514d52
commit a856e98a6a

View file

@ -107,7 +107,6 @@ module CouchRest
# PUT an attachment directly to CouchDB # PUT an attachment directly to CouchDB
def put_attachment(doc, name, file, options = {}) def put_attachment(doc, name, file, options = {})
docid = escape_docid(doc['_id']) docid = escape_docid(doc['_id'])
name = CGI.escape(name)
uri = url_for_attachment(doc, name) uri = url_for_attachment(doc, name)
JSON.parse(HttpAbstraction.put(uri, file, options)) JSON.parse(HttpAbstraction.put(uri, file, options))
end end