Description
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:
-
Running the test server(node js installation is required):
cd [base_folder]/JavaProject-100Continue/src/main/resources
node testserver.js -
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."} -
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. -
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.