-
Notifications
You must be signed in to change notification settings - Fork 581
Description
It seems that using defaultDocument to point iisnode to the server js file is dropping the querystring. If I access the document directly it maintains the querystring, but using just / loses it.
I set up a test to confirm:
---- app.js
var express = require('express');
var app = express();
app.get('*', function(req, res){
res.send( req._parsedUrl );
});
app.listen(process.env.PORT);
---- web.config
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<defaultDocument enabled="true">
<files>
<add value="app.js" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
---- console
$ curl http://localhost/iisnodetest/?dan=lash
{
"protocol": null,
"slashes": null,
"auth": null,
"host": null,
"port": null,
"hostname": null,
"hash": null,
"search": null,
"query": null,
"pathname": "/iisnodetest/app.js",
"path": "/iisnodetest/app.js",
"href": "/iisnodetest/app.js"
}
$ curl http://localhost/iisnodetest/app.js?dan=lash
{
"protocol": null,
"slashes": null,
"auth": null,
"host": null,
"port": null,
"hostname": null,
"hash": null,
"search": "?dan=lash",
"query": "dan=lash",
"pathname": "/iisnodetest/app.js",
"path": "/iisnodetest/app.js?dan=lash",
"href": "/iisnodetest/app.js?dan=lash"
}