diff --git a/lib/request.js b/lib/request.js index e7a451df6d9..68243f52b6d 100644 --- a/lib/request.js +++ b/lib/request.js @@ -424,7 +424,7 @@ defineGetter(req, 'host', function host(){ } else if (val.indexOf(',') !== -1) { // Note: X-Forwarded-Host is normally only ever a // single value, but this is to be safe. - val = val.substring(0, val.indexOf(',')).trimRight() + val = val.substring(0, val.indexOf(',')).trimEnd() } return val || undefined;