Since upgrading to 2.40 all requests to the same earlier working nginx servers are failing with and 413 error code.
From the changelog I'm usable to find a possibly reason. Even at the form-data changes nothing seems to directly affect this kind of problem.

With v2.40 (and maybe the a meanwhile modified part of form-data) the object with knownlength as property is no longer needed, likewise getLengthSync() seems to be done internally automatically.
In my case the old code is running again, only the mentioned lines have to be modified and/or removed.