You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Searched both open and closed issues for duplicates of this issue
Title adequately and concisely reflects the feature or the bug
Restify Version: 8.5.1 Node.js Version: 12.18.3
Expected behaviour
I expected that I would be able to send a GET request with a URI longer than 200 characters
Actual behaviour
The code I wrote works find as long as the total URI with all query-string parameters is < 200 characters, but when the URI goes over 200 characters then the route hangs for the client and the server acts like it never even receives the request
Repro case
Server Declaration:
const{ createServer, plugins, pre }=require(`restify`);constpkg=require(`../package.json`);constserver=createServer({ignoreTrailingSlash: true,// added as part of debuggingmaxParamLength: 1000,// added as part of debuggingname: pkg.name,version: pkg.version,});server.server.setTimeout(0);server.pre(pre.sanitizePath());server.use(plugins.acceptParser(server.acceptable));server.use(plugins.dateParser());server.use(plugins.queryParser({arrayLimit: 1000,// added as part of debuggingmapParams: true,parameterLimit: 1000,// added as part of debugging}));server.use(plugins.jsonp());server.use(plugins.gzipResponse());server.use(plugins.bodyParser({hash: `sha1`,keepExtensions: true,mapFiles: false,mapParams: false,maxBodySize: 1000,// added as part of debuggingmaxFieldsSize: 2*1024*1024*1024,// added as part of debuggingmultiples: true,reviver: undefined,uploadDir: path.resolve(`${process.cwd()}/temp`),}));
Route
server.get(`/vendor-markup/box-floors/sum`,async(req,res,next)=>{try{const{ a, b }=req.params;
...
usetheparamsandsendresponse
...
}catch(err){next(err);}},);
Postman examples
I have also tested this using restify-clients.createJsonClient and get the same results
I have dug through much of the source code and believe this is not an issue with find-my-way (as described in #1677) and it is not an issue with the queryParser plugin. Neither of these two libraries seem to receive the request when it breaks the 200 character limit
Are you willing and able to fix this?
I am willing to help fix this, however I have never looked much into the restify source code and need help pinpointing exactly what is causing this problem.
The text was updated successfully, but these errors were encountered:
Restify Version: 8.5.1
Node.js Version: 12.18.3
Expected behaviour
I expected that I would be able to send a GET request with a URI longer than 200 characters
Actual behaviour
The code I wrote works find as long as the total URI with all query-string parameters is < 200 characters, but when the URI goes over 200 characters then the route hangs for the client and the server acts like it never even receives the request
Repro case
Server Declaration:
Route
Postman examples
I have also tested this using
restify-clients.createJsonClient
and get the same results199 chars, works
200 chars, doesn't work
Cause
I have dug through much of the source code and believe this is not an issue with
find-my-way
(as described in #1677) and it is not an issue with thequeryParser
plugin. Neither of these two libraries seem to receive the request when it breaks the 200 character limitAre you willing and able to fix this?
I am willing to help fix this, however I have never looked much into the restify source code and need help pinpointing exactly what is causing this problem.
The text was updated successfully, but these errors were encountered: