Closed shimaore closed 9 years ago
I use code like the following (CoffeeScript):
couchapp = require 'couchapp' for script in ['authorize','replicate','global'] couchapp.createApp require("./#{script}"), uri, (app)-> app.push()
in order to push multiple design documents at once,
However this does not work because couchapp shares the "headers" parameter (var h) between multiple request() instances.
(The issue happens whether the push() operations are in parallel (my example above) or serialized.)
Fix: copy line 11 in main.js so that each request(...) call gets its own, independent set of headers.
Fix: https://gist.github.com/1046898
I use code like the following (CoffeeScript):
in order to push multiple design documents at once,
However this does not work because couchapp shares the "headers" parameter (var h) between multiple request() instances.
(The issue happens whether the push() operations are in parallel (my example above) or serialized.)
Fix: copy line 11 in main.js so that each request(...) call gets its own, independent set of headers.