Metadata JSON hits HTTP header-size limit
adamhooper opened this issue · 2 comments
adamhooper commented
When uploading files with large metadata-json, we can hit a Netty maxHeaderSize limit.
With non-ASCII characters, we can hit 8kb awfully fast: each non-ASCII character is encoded as \uXXXX
: 6-12 ASCII characters. Our metadata JSON limit is effectively 1.3kb.
Unfortunately, setting play.server.netty.maxHeaderSize
in config did nothing for me in dev mode. I'm perplexed.
But it's ultimately moot: Play 2.6 uses akka-http, which will have its own config option.
adamhooper commented
Quoting http://doc.akka.io/docs/akka-http/10.0.9/scala/http/configuration.html:
# The limits for the various parts of the HTTP message parser.
max-uri-length = 2k
max-method-length = 16
max-response-reason-length = 64
max-header-name-length = 64
max-header-value-length = 8k
max-header-count = 64
max-chunk-ext-length = 256
max-chunk-size = 1m
Indeed, we uploaded a large docset with no problem. I believe this is solved.
adamhooper commented
(The difference is: we're using Play 2.6 now.)