Forum Stats

  • 3,854,144 Users
  • 2,264,327 Discussions
  • 7,905,576 Comments

Discussions

Issue with unlimited max post size and chunked http POST Request

Quentin
Quentin Member Posts: 1 Green Ribbon
edited Jan 25, 2021 3:41PM in WebLogic

Dear all, 

In one of my projects, I have to handle chunked post requests. During my tests, I discovered that my servlet request did not have all the post params. After investigation, it seems that in case of chunked post request the Max Post Size parameter in WebLogic is wrongly interpreted.

According to the documentation, if the Max Post Size is less than 0, this means unlimited. However, with the value set to “-1”, only the 8192 bytes of my request is parsed. If I set a Max Post Size greater than my request for example 26214400 bytes (25MB), the entire request is parsed and all the params of the request are available. 

This seems coming from the class weblogic.servlet.internal.ServletRequestImpl in the function mergePostParams which contains the following code:

if (isChunked) {

   read = this.request.getContext().getServer().getMaxPostSize();

   clen = read > -1 ? read + 1 : 8192;

 }


In the case of Max Post Size less than 0, the value 8192 is used and a little further in the code, only the first 8192 are parsed. Which seems in contradiction with the documentation. 

My current workaround is to define a Max Post Size greater than the usual request size, but I would like to keep it unlimited. 

I didn’t find any information about this issue on the internet.

Weblogic version: 12.2.1.3.0

Quentin