Skip to content

jersey-netty-connector – multipart payload can’t be sent when Expect100ContinueFeature is enabled #5833

Open
@zhangzhengming

Description

@zhangzhengming

Using Jersey v2.46 with JDK 17

Use case 1 - uploading a file with Expect100ContinueFeature enabled.
Use case 2 - uploading a simple json payload with Expect100ContinueFeature enabled.

Steps of reproducing the issue(simple case with simple payload):
Download file JavaProject-100Continue.zip
Follow the steps in readme.txt file in the zip file:

  1. Running the test server(node js installation is required):
    cd [base_folder]/JavaProject-100Continue/src/main/resources
    node testserver.js

  2. Verify the test server
    Call the server with HTTP header expect:100-continue:
    curl -v --location 'http://127.0.0.1:3000' --header 'Content-Type: application/json' --header 'expect: 100-continue' --data '{"msg": "hello from curl"}'
    Expected response:
    {"message": "Request processed successfully after 100-continue."}

    Call the server without HTTP header:
    curl -v --location 'http://127.0.0.1:3000' --header 'Content-Type: application/json' --data '{"msg": "hello from curl"}'
    Expected response:
    {"message": "Request processed successfully."}

  3. Reproduce the issue(java/maven installation are required) with simple json payload:
    cd [base_folder]/JavaProject-100Continue
    mvn clean install && mvn exec:java
    No response returned from server.

  4. Just for comparing with the expected behavior, comment out below code to use the default connector provider.
    //defaultConfig.connectorProvider(new NettyConnectorProvider());
    Get response: { "message": "Request processed successfully after 100-continue." }

It seams Jersey can't handle HTTP code 100.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions