Skip to content

Commit

Permalink
don't try to send an object, send a json string
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 20, 2011
1 parent dd206eb commit 0cb401f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion registry/app.js
Expand Up @@ -850,9 +850,13 @@ ddoc.shows.package = function (doc, req) {
url += '/' + req.query.version // add the version to the URL if necessary url += '/' + req.query.version // add the version to the URL if necessary
} }
headers.Location = url headers.Location = url
body = { location: url, _rev: doc._rev }
body = req.query.jsonp
? req.query.jsonp + "(" + JSON.stringify(body) + ")"
: JSON.stringify(body)
return { return {
code : 301, code : 301,
body : { location: url, _rev: doc._rev }, body : body,
headers : headers headers : headers
} }
} }
Expand Down

0 comments on commit 0cb401f

Please sign in to comment.