HTTP query string length with thin web server

时光怂恿深爱的人放手 提交于 2019-12-14 02:59:12

问题


When performing a GET request to my rails application (with thin web server), I got the following error:

Invalid request: HTTP element QUERY_STRING is longer than the (1024 * 10) allowed length.

The application is part of a prototype for a master thesis, and the use of GET (not POST) requests is most important. Is there a way to change the query string length?


回答1:


To change the query string max length of thin you have to change its native C extension parser.

Just change this line in the file ext/thin_parser/thin.c and regenerate the gem:

DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));

https://github.com/macournoyer/thin/blob/master/ext/thin_parser/thin.c#L71



来源:https://stackoverflow.com/questions/29720679/http-query-string-length-with-thin-web-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!