I'm experiencing a weird issue: sometimes HTTP message request target (full path followed by ? and query string) is cut off to exactly 4095 characters before reaching my Tomcat server controllers.
The request is cut off already in Tomcat's access logs.
It doesn't happen all the time and I can easily see longer messages in Tomcat's access logs. Because of this, it isn't a server issue, I reckon.
One important information is that the URL is generated dynamically and injected into a page using appendChild Javascript method on HEAD element.
There's no HTTP aware component between user's browser and Tomcat server (no Level 7 load balancer, for instance).
I though this might be a browser issue. One common user agent when this happens is 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36', which apparently is Chrome63 on Windows10. I tried to reproduce it using such set up, but no success.
On the other machine when the issue is reproducible, I can see a full URL when inspecting the page using development tools.
Has anybody faced a similar issue? What could cut the URL off?
Update: it's not a duplicate of HttpRequest maximum allowable size in tomcat?. I see longer URIs in my access log and they work fine. Also, I tested be reducing max header number and I could easily see longer URIs passed through.