Increase max header size in play framework 1.5.x

1.1k views Asked by At

We're finding the following error in our client play 1.5.x framework application

25 mag 2020 15:18:34  ERROR ~ Request exceeds 8192 bytes

It is related to the header size (we tested it with a curl with a header bigger than 8kb).

We didn't find in the official documentation how to increase the accepted header size in default play http server. We tried with

-Dhttp.netty.maxHeaderSize=65536
-Dhttp.netty.maxInitialLineLength=65536
-Dplay.server.netty.maxInitialLineLength=65536
-Dplay.server.netty.maxHeaderSize=65536

but none of these seem working (probably because they are play 2.x config). Any idea? Thanks

1

There are 1 answers

1
Emil Orol On

We had a similar issue to this today and we solved with the following:

-Dplay.server.akka.max-header-value-length=128k

Posting for posterity in case someone else run into the same problem.