visionmedia/express — Issue #1013: bug with leading slash
Author: rlidwka
Created: 2012-02-16 04:08:36+00:00
State: open

squogre:~:% telnet localhost 3003
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET http://qwerty.com/test.html HTTP/1.0

HTTP/1.1 404 Not Found
X-Powered-By: Express
Content-Type: text/plain
Connection: close

Cannot GET /http://qwerty.com/test.html
Connection closed by foreign host.

-------------------------------------

As you can see, when URI is full URL, Express adds extra slash before http in `request.url` despite the fact that is it already correct URL.

I was trying to write a proxy server and for a proxy such requests are quite common.

I use latest version from git, and server was something simple like that:
```
app = require('express')();
app.listen(3003);
app.use (req,res,next) -> console.log(req.url); next()
```