summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-09-24 11:30:26 -0700
committerNathan Rajlich <nathan@tootallnate.net>2012-09-24 11:48:39 -0700
commit0f2ed2bc2c1164a33c39d172960b4aca1be08baa (patch)
tree97dc35ea481fd15a419e6308eff4ad652fa6237c /lib
parent4a2670740c0e8cb4831c2c089cc7de7337a55e80 (diff)
downloadnode-new-0f2ed2bc2c1164a33c39d172960b4aca1be08baa.tar.gz
http: make the client "res" object gets the same domain as "req"
Fixes #4046.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http.js b/lib/http.js
index 9178780238..a56cdc7e1e 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -1412,6 +1412,12 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
var socket = this.socket;
var req = socket._httpMessage;
+ // propogate "domain" setting...
+ if (req.domain && !res.domain) {
+ debug('setting "res.domain"');
+ res.domain = req.domain;
+ }
+
debug('AGENT incoming response!');
if (req.res) {