Browse files

[plugin] removed nasty newlines from attachments content-type

  • Loading branch information...
1 parent 3f3d7fd commit 8a301a2e6aa5852f19b5cd6962d4243c9096bafa @dscape dscape committed Sep 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/couchdb.js
View
2 plugins/couchdb.js
@@ -21,7 +21,7 @@ function attachment() {
return {
start: function(content_type, name) {
filename = name;
- doc._attachments[filename] = {content_type: content_type};
+ doc._attachments[filename] = {content_type: content_type.replace(/\n/g, " ")};
},
data: function(data) { bufs.push(data) },
end: function() { if(filename) doc._attachments[filename]['data'] = bufs.slice().toString('base64') },

0 comments on commit 8a301a2

Please sign in to comment.