@@ -51,15 +51,15 @@ var options = helpers.parseProtocol(),
51
51
vows . describe ( 'node-http-proxy/http-proxy/' + testName ) . addBatch ( {
52
52
"When using server created by httpProxy.createServer()" : {
53
53
"with no latency" : {
54
- "and a valid target server" : runner . assertProxied ( 'localhost' , 8080 , 8081 , function ( callback ) {
54
+ "and a valid target server" : runner . assertProxied ( 'localhost' , 8080 , 8081 , false , false , function ( callback ) {
55
55
runner . startProxyServer ( 8080 , 8081 , 'localhost' , callback ) ;
56
56
} ) ,
57
57
"and without a valid target server" : runner . assertResponseCode ( 8082 , 500 , function ( callback ) {
58
58
runner . startProxyServer ( 8082 , 9000 , 'localhost' , callback ) ;
59
59
} )
60
60
} ,
61
61
"with latency" : {
62
- "and a valid target server" : runner . assertProxied ( 'localhost' , 8083 , 8084 , function ( callback ) {
62
+ "and a valid target server" : runner . assertProxied ( 'localhost' , 8083 , 8084 , false , false , function ( callback ) {
63
63
runner . startLatentProxyServer ( 8083 , 8084 , 'localhost' , 1000 , callback ) ;
64
64
} ) ,
65
65
"and without a valid target server" : runner . assertResponseCode ( 8085 , 500 , function ( callback ) {
@@ -71,13 +71,13 @@ vows.describe('node-http-proxy/http-proxy/' + testName).addBatch({
71
71
runner . startTargetServer ( 8300 , 'forward proxy' , this . callback ) ;
72
72
} ,
73
73
"with no latency" : {
74
- "and a valid target server" : runner . assertProxied ( 'localhost' , 8120 , 8121 , function ( callback ) {
74
+ "and a valid target server" : runner . assertProxied ( 'localhost' , 8120 , 8121 , false , false , function ( callback ) {
75
75
runner . startProxyServerWithForwarding ( 8120 , 8121 , 'localhost' , forwardOptions , callback ) ;
76
76
} ) ,
77
77
"and also a valid target server" : runner . assertHeaders ( 8122 , "x-forwarded-for" , function ( callback ) {
78
78
runner . startProxyServerWithForwarding ( 8122 , 8123 , 'localhost' , forwardOptions , callback ) ;
79
79
} ) ,
80
- "and without a valid forward server" : runner . assertProxied ( 'localhost' , 8124 , 8125 , function ( callback ) {
80
+ "and without a valid forward server" : runner . assertProxied ( 'localhost' , 8124 , 8125 , false , false , function ( callback ) {
81
81
runner . startProxyServerWithForwarding ( 8124 , 8125 , 'localhost' , badForwardOptions , callback ) ;
82
82
} )
83
83
}
0 commit comments