Url max length when using rest (jersey)

跟風遠走 提交于 2019-12-13 06:55:37

问题


if I ask a (rest) service to give me data with an url like this

http://example.com/?userid=1,2,3,4(...)

there's a url size limit, meaning I am limited in how many userids I can send over to the server.

So far so clear, but if I call this url from a jersey client to a jersy rest service, it seems like I have no limit. So is there a url limit for jersey as well? Thanks


回答1:


The limit would be defined by your servlet container. For example, this describes setting the limit in tomcat




回答2:


The limit comes from the http servlet container configuration or http client, not from the rest framework as also mentioned in the above response. In case of jetty http://www.eclipse.org/jetty/documentation/current/configuring-connectors.html -> HTTP Configuration -> requestHeaderSize



来源:https://stackoverflow.com/questions/25157082/url-max-length-when-using-rest-jersey

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