Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Problem reading POST body with embedded Jetty 12.0.x

Hi Simone,

I would have if an exception would be thrown. Unfortunately, that is not the case. The application simply blocks while reading the input from the post body.

Kind regards,


On 11-09-2023 19:46, Simone Bordet wrote:

On Mon, Sep 11, 2023 at 2:16 PM Silvio Bierman via jetty-users
<jetty-users@xxxxxxxxxxx> wrote:
It appears that all handling of POST requests with ZIP-content as
payload in our application is broken with Jetty 12 (I tried both 12.0.0
and 12.0.1). We use an embedded Jetty-12 with ee10 and http/2.

Using Jetty 11 the code works as expected.

We post a ZIP-file from the command line using Curl to the application.
The handling code wraps request.getInputStream in a BufferedInputStream
wrapped in a ZipInputStream and starts reading ZipEntry objects with
getNextEntry until this returns null. With Jetty 12 this code only
manages to read the first part of the POST-body and then blocks
indefinitely. This is not a multi-part request, the ZIP-content is
simply used as the request payload.

We have similar handling of ZIP-files posted from inside HTML pages
(using JS FormData and XmlHttpRequest) and the same thing happens there.
In this case the FormData is used to create a multi-part POST.

Each time the first parts of the payload seems to be handled correctly.
The initial entries are expanded and written to server side files

No exceptions occur. The code just seems to block indefinitely with no
CPU activity.

Any ideas? Perhaps there is something wrong with our embedding code?
Please open an issue with the code example, where it throws, and the
stack trace.
GH issues are better for this kind of analysis.


Back to the top