You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I just upgraded from 0.8.7 to 1.5.0. Before the upgrade, we could accept requests up to 10MB. But now all the requests are always being cut. The problem is that LimitConcurrentRequestsMiddleware used to operate INI's post_max_size settings, and now it's limited by HttpServer::getMaxRequestSize(), and its result can not be higher than HttpServer::MAXIMUM_BUFFER_SIZE. Is there any workaround to accept heavy packages?
RequestBodyBufferMiddleware has a solution for this (it ignores sizeLimit if an actual size is higher):
// request body of known size exceeding limit
$sizeLimit = $this->sizeLimit;
if ($size > $this->sizeLimit) {
$sizeLimit = 0;
}
But LimitConcurrentRequestsMiddleware is always being limited to MAXIMUM_BUFFER_SIZE.
I find the logic pretty unclear, because RequestBodyBufferMiddleware does accept packages higher than MAXIMUM_BUFFER_SIZE, but at the same time it's always limited due to LimitConcurrentRequestsMiddleware.
It seems like you already found your way of dealing with this, a similar approach can be found inside the documentation. You can also take a look at #371.
Activity
ozahorulia commentedon Jan 11, 2022
Fixed by explicitly passing middleware objects to HttpServer:
SimonFrings commentedon Jan 31, 2022
Hey @hast, thanks for opening this up 👍
It seems like you already found your way of dealing with this, a similar approach can be found inside the documentation. You can also take a look at #371.