mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
test case added
This commit is contained in:
parent
2d01edc5a5
commit
f5217d6c20
@ -191,6 +191,28 @@ describe('lib/http-proxy/passes/web-outgoing.js', function () {
|
|||||||
expect(proxyRes.headers.connection).to.eql('keep-alive');
|
expect(proxyRes.headers.connection).to.eql('keep-alive');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('don`t set connection with 2.0 if exist', function() {
|
||||||
|
var proxyRes = { headers: {} };
|
||||||
|
httpProxy.setConnection({
|
||||||
|
httpVersion: '2.0',
|
||||||
|
headers: {
|
||||||
|
connection: 'namstey'
|
||||||
|
}
|
||||||
|
}, {}, proxyRes);
|
||||||
|
|
||||||
|
expect(proxyRes.headers.connection).to.eql(undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('don`t set connection with 2.0 if doesn`t exist', function() {
|
||||||
|
var proxyRes = { headers: {} };
|
||||||
|
httpProxy.setConnection({
|
||||||
|
httpVersion: '2.0',
|
||||||
|
headers: {}
|
||||||
|
}, {}, proxyRes);
|
||||||
|
|
||||||
|
expect(proxyRes.headers.connection).to.eql(undefined);
|
||||||
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#writeStatusCode', function () {
|
describe('#writeStatusCode', function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user