JAVA -tomcat- Request header is too large

前端 未结 8 1680
情歌与酒
情歌与酒 2020-12-30 20:18
INFO: Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: R         


        
相关标签:
8条回答
  • 2020-12-30 20:49

    Its an old post - but anyone looking to change server.max-http-header-size in latest spring boot (version >=2.1) - Value should be provided in Datasize parsable value e.g - server.max-http-header-size=64KB

    0 讨论(0)
  • 2020-12-30 20:58

    I'll add a different "answer" to this problem: the problem could be too many or too large cookies, in the browser of the user visiting the site giving the error.

    While most have (understandably) focused on how to change Tomcat to ALLOW a larger header, I'll point out that in a case where I experienced this error, I was able to use my browser dev tools to see that somehow there was a very large number of cookies being sent to the site which generated the error. (They seemed of a sort that I felt something on the server had been mistaken in creating so many, as they had named that were near duplicates of each other, with dupe values.)

    I cleared the cookies for this site (using the browser dev tools), and now I did not get the error. Of course, clearing cookies can cause issues like being logged out of the site, etc. In my case, that was a small price to pay for being able to use the site again.

    I leave this in case others may hit it some day, and either be the person getting the error (like I was) or a server admin whose users are reporting it, who could ask them to consider clearing the cookies for their site (there are many ways, of course, and web sites to help).

    0 讨论(0)
提交回复
热议问题