nodejitsu/node-http-proxy — Issue #178: No trailing slash with query produces hang
Author: twhid
Created: 2012-01-21 16:23:26+00:00
State: open

If this issue should be discussed elsewhere, please let me know the best place.

++

I have a very simple reverse proxy set-up. Here's the skeleton:

```
var http = require('http'),
httpProxy = require('http-proxy');

var options = {

router: {
... bunch of other routes to Apache...
// node routes
'mytest.local/mypath': '127.0.0.1:8081'
}
};

var proxyServer = httpProxy.createServer(options);
proxyServer.listen(8082);
```
The app running at 8081 expects a query string.

(Note: I'm forwarding 80 to 8082.)

Loading mytest.local/mypath or mytest.local/mypath/ works as expected. However, when the query is thrown in (mytest.local/mypath?foo=bar), the server never responds. With a trailing slash (mytest.local/mypath/?foo=bar) all is good.

You may be thinking: 'so what, use the trailing slash.' On top of it, the server continues to respond though other clients are hung up and waiting forever.

But, it just doesn't seem correct. It should work either way, no?