Skip to content

Commit

Permalink
ENH: updated ws and web functions to use the global options objec…
Browse files Browse the repository at this point in the history
…t as a base

even if request options is specified. request options will over write any global options in a conflict
  • Loading branch information
srossross committed Sep 16, 2013
1 parent 1b867a7 commit 268afe3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/caronte/index.js
@@ -1,5 +1,6 @@
var caronte = exports,
web = require('./passes/web-incoming');
extend = require('util')._extend,
web = require('./passes/web-incoming'),
ws = require('./passes/ws-incoming');

caronte.createWebProxy = createRightProxy('web');
Expand Down Expand Up @@ -41,7 +42,11 @@ function createRightProxy(type) {
!(args[cntr] instanceof Buffer) &&
args[cntr] !== res
) {
options = args[cntr];
//Copy global options
options = extend({}, options);
//Overwrite with request options
extend(options, args[cntr]);

cntr--;
}

Expand Down

0 comments on commit 268afe3

Please sign in to comment.