magrain opened a new pull request #8448:
URL: https://github.com/apache/pulsar/pull/8448
### Motivation
- Fixed "Negative initial size: -1" error when request.getContentLength()
returns a number less than 0.
### Modifications
- Fix request.getContentLength() to return 0 if it is less than 0.
- Add unit test.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- AdminProxyHandlerTest.java
example:
- If request.getContentLength () returns -1, make sure bodyBuffer is 0.
### Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
### Documentation
- Does this pull request introduce a new feature? (no)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]