Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't try to send an object, send a json string

  • Loading branch information...
commit 0cb401f04021c77050732d564edfb46797c321d7 1 parent dd206eb
@isaacs isaacs authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 registry/app.js
View
6 registry/app.js
@@ -850,9 +850,13 @@ ddoc.shows.package = function (doc, req) {
url += '/' + req.query.version // add the version to the URL if necessary
}
headers.Location = url
+ body = { location: url, _rev: doc._rev }
+ body = req.query.jsonp
+ ? req.query.jsonp + "(" + JSON.stringify(body) + ")"
+ : JSON.stringify(body)
return {
code : 301,
- body : { location: url, _rev: doc._rev },
+ body : body,
headers : headers
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.