Skip to content

Commit 220f5fb

Browse files
131jcrugzz
authored andcommitted
Expose full callback names
1 parent d48f67e commit 220f5fb

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

lib/http-proxy/passes/web-incoming.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
* @api private
2929
*/
3030

31-
deleteLength : function(req, res, options) {
31+
deleteLength : function deleteLength(req, res, options) {
3232
if((req.method === 'DELETE' || req.method === 'OPTIONS')
3333
&& !req.headers['content-length']) {
3434
req.headers['content-length'] = '0';
@@ -46,7 +46,7 @@ module.exports = {
4646
* @api private
4747
*/
4848

49-
timeout: function(req, res, options) {
49+
timeout: function timeout(req, res, options) {
5050
if(options.timeout) {
5151
req.socket.setTimeout(options.timeout);
5252
}
@@ -62,7 +62,7 @@ module.exports = {
6262
* @api private
6363
*/
6464

65-
XHeaders : function(req, res, options) {
65+
XHeaders : function XHeaders(req, res, options) {
6666
if(!options.xfwd) return;
6767

6868
var encrypted = req.isSpdy || common.hasEncryptedConnection(req);
@@ -94,7 +94,7 @@ module.exports = {
9494
* @api private
9595
*/
9696

97-
stream : function(req, res, options, _, server, clb) {
97+
stream : function stream(req, res, options, _, server, clb) {
9898

9999
// And we begin!
100100
server.emit('start', req, res, options.target)

lib/http-proxy/passes/web-outgoing.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = { // <--
2323
*
2424
* @api private
2525
*/
26-
removeChunked : function (req, res, proxyRes) {
26+
removeChunked : function removeChunked(req, res, proxyRes) {
2727
if (req.httpVersion === '1.0') {
2828
delete proxyRes.headers['transfer-encoding'];
2929
}
@@ -39,15 +39,15 @@ module.exports = { // <--
3939
*
4040
* @api private
4141
*/
42-
setConnection: function(req, res, proxyRes) {
42+
setConnection: function setConnection(req, res, proxyRes) {
4343
if (req.httpVersion === '1.0') {
4444
proxyRes.headers.connection = req.headers.connection || 'close';
4545
} else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) {
4646
proxyRes.headers.connection = req.headers.connection || 'keep-alive';
4747
}
4848
},
4949

50-
setRedirectHostRewrite: function(req, res, proxyRes, options) {
50+
setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) {
5151
if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite)
5252
&& proxyRes.headers['location']
5353
&& redirectRegex.test(proxyRes.statusCode)) {
@@ -82,7 +82,7 @@ module.exports = { // <--
8282
*
8383
* @api private
8484
*/
85-
writeHeaders : function(req, res, proxyRes, options) {
85+
writeHeaders : function writeHeaders(req, res, proxyRes, options) {
8686
var rewriteCookieDomainConfig = options.cookieDomainRewrite;
8787
if (typeof rewriteCookieDomainConfig === 'string') { //also test for ''
8888
rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig };
@@ -107,7 +107,7 @@ module.exports = { // <--
107107
*
108108
* @api private
109109
*/
110-
writeStatusCode : function(req, res, proxyRes) {
110+
writeStatusCode : function writeStatusCode(req, res, proxyRes) {
111111
// From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers])
112112
if(proxyRes.statusMessage) {
113113
res.writeHead(proxyRes.statusCode, proxyRes.statusMessage);

lib/http-proxy/passes/ws-incoming.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
* @api private
2828
*/
2929

30-
checkMethodAndHeader : function (req, socket) {
30+
checkMethodAndHeader : function checkMethodAndHeader(req, socket) {
3131
if (req.method !== 'GET' || !req.headers.upgrade) {
3232
socket.destroy();
3333
return true;
@@ -49,7 +49,7 @@ module.exports = {
4949
* @api private
5050
*/
5151

52-
XHeaders : function(req, socket, options) {
52+
XHeaders : function XHeaders(req, socket, options) {
5353
if(!options.xfwd) return;
5454

5555
var values = {
@@ -76,7 +76,7 @@ module.exports = {
7676
*
7777
* @api private
7878
*/
79-
stream : function(req, socket, options, head, server, clb) {
79+
stream : function stream(req, socket, options, head, server, clb) {
8080
common.setupSocket(socket);
8181

8282
if (head && head.length) socket.unshift(head);

0 commit comments

Comments
 (0)