Permalink
Browse files

explicitly set and send x- headers, x_headers test now passes

  • Loading branch information...
1 parent af94d75 commit 68cec1d56a7a3877189a0e105a776f8c07839125 @substack committed Mar 22, 2013
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/x_headers.js
View
@@ -18,7 +18,16 @@ test('check for x-forwarded default headers', function (t) {
s0.listen(p0, connect);
var p1 = Math.floor(Math.random() * (Math.pow(2,16) - 1e4) + 1e4);
- var s1 = bouncy(function (req, bounce) { bounce(p0) });
+ var s1 = bouncy(function (req, bounce) {
+ bounce({
+ port: p0,
+ headers: {
+ 'x-forwarded-for': '127.0.0.1',
+ 'x-forwarded-port': p1.toString(),
+ 'x-forwarded-proto': 'http'
+ }
+ });
+ });
s1.listen(p1, connect);
var connected = 0;

0 comments on commit 68cec1d

Please sign in to comment.