Skip to content

Commit

Permalink
Expose full callback names
Browse files Browse the repository at this point in the history
  • Loading branch information
131 authored and jcrugzz committed Oct 22, 2016
1 parent d48f67e commit 220f5fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions lib/http-proxy/passes/web-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
* @api private
*/

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

timeout: function(req, res, options) {
timeout: function timeout(req, res, options) {
if(options.timeout) {
req.socket.setTimeout(options.timeout);
}
Expand All @@ -62,7 +62,7 @@ module.exports = {
* @api private
*/

XHeaders : function(req, res, options) {
XHeaders : function XHeaders(req, res, options) {
if(!options.xfwd) return;

var encrypted = req.isSpdy || common.hasEncryptedConnection(req);
Expand Down Expand Up @@ -94,7 +94,7 @@ module.exports = {
* @api private
*/

stream : function(req, res, options, _, server, clb) {
stream : function stream(req, res, options, _, server, clb) {

// And we begin!
server.emit('start', req, res, options.target)
Expand Down
10 changes: 5 additions & 5 deletions lib/http-proxy/passes/web-outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = { // <--
*
* @api private
*/
removeChunked : function (req, res, proxyRes) {
removeChunked : function removeChunked(req, res, proxyRes) {
if (req.httpVersion === '1.0') {
delete proxyRes.headers['transfer-encoding'];
}
Expand All @@ -39,15 +39,15 @@ module.exports = { // <--
*
* @api private
*/
setConnection: function(req, res, proxyRes) {
setConnection: function setConnection(req, res, proxyRes) {
if (req.httpVersion === '1.0') {
proxyRes.headers.connection = req.headers.connection || 'close';
} else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) {
proxyRes.headers.connection = req.headers.connection || 'keep-alive';
}
},

setRedirectHostRewrite: function(req, res, proxyRes, options) {
setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) {
if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite)
&& proxyRes.headers['location']
&& redirectRegex.test(proxyRes.statusCode)) {
Expand Down Expand Up @@ -82,7 +82,7 @@ module.exports = { // <--
*
* @api private
*/
writeHeaders : function(req, res, proxyRes, options) {
writeHeaders : function writeHeaders(req, res, proxyRes, options) {
var rewriteCookieDomainConfig = options.cookieDomainRewrite;
if (typeof rewriteCookieDomainConfig === 'string') { //also test for ''
rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig };
Expand All @@ -107,7 +107,7 @@ module.exports = { // <--
*
* @api private
*/
writeStatusCode : function(req, res, proxyRes) {
writeStatusCode : function writeStatusCode(req, res, proxyRes) {
// From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers])
if(proxyRes.statusMessage) {
res.writeHead(proxyRes.statusCode, proxyRes.statusMessage);
Expand Down
6 changes: 3 additions & 3 deletions lib/http-proxy/passes/ws-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
* @api private
*/

checkMethodAndHeader : function (req, socket) {
checkMethodAndHeader : function checkMethodAndHeader(req, socket) {
if (req.method !== 'GET' || !req.headers.upgrade) {
socket.destroy();
return true;
Expand All @@ -49,7 +49,7 @@ module.exports = {
* @api private
*/

XHeaders : function(req, socket, options) {
XHeaders : function XHeaders(req, socket, options) {
if(!options.xfwd) return;

var values = {
Expand All @@ -76,7 +76,7 @@ module.exports = {
*
* @api private
*/
stream : function(req, socket, options, head, server, clb) {
stream : function stream(req, socket, options, head, server, clb) {
common.setupSocket(socket);

if (head && head.length) socket.unshift(head);
Expand Down

0 comments on commit 220f5fb

Please sign in to comment.