I think I discovered a bug.
If I host the Nuts middleware on a route such as app.use('/myapp', Nuts.router) in express and GET the /update/:platform/:version/RELEASES route the generated filenames do not include my custom path /myapp if query parameters are present in the requested path. It does not seeem to matter what the query parameters are, only that they are present.
Calling http://myserver.com/myapp/update/:platform/:version/RELEASES generates a RELEASES file containing correct filename URLs with my custom path like so:
... http://myserver.com/myapp/download/x.x.x/...-full.nupkg ...
Calling http://myserver.com/myapp/update/:platform/:version/RELEASES?test=asd generates a RELEASES file containing filename URLs without the /myapp path:
... http://myserver.com/download/x.x.x/...-full.nupkg ...
I've had a quick look through the source code and I think the urljoin.js module does not handle query parameters correctly when transforming the RELEASES filenames.
I think I discovered a bug.
If I host the Nuts middleware on a route such as
app.use('/myapp', Nuts.router)in express and GET the/update/:platform/:version/RELEASESroute the generated filenames do not include my custom path/myappif query parameters are present in the requested path. It does not seeem to matter what the query parameters are, only that they are present.Calling
http://myserver.com/myapp/update/:platform/:version/RELEASESgenerates a RELEASES file containing correct filename URLs with my custom path like so:Calling
http://myserver.com/myapp/update/:platform/:version/RELEASES?test=asdgenerates a RELEASES file containing filename URLs without the/myapppath:I've had a quick look through the source code and I think the
urljoin.jsmodule does not handle query parameters correctly when transforming the RELEASES filenames.