rich7420 commented on code in PR #10461:
URL: https://github.com/apache/ozone/pull/10461#discussion_r3482182028
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/CompleteMultipartUploadRequestUnmarshaller.java:
##########
@@ -50,11 +51,18 @@ public CompleteMultipartUploadRequest readFrom(
MultivaluedMap<String, String> multivaluedMap,
InputStream inputStream) throws WebApplicationException {
try {
- if (inputStream.available() == 0) {
+ // Detect an empty request body by trying to read a single byte rather
+ // than relying on InputStream#available(), which may return 0 even when
+ // the body is not yet buffered (e.g. with Expect: 100-continue). See
+ // HDDS-14760.
+ PushbackInputStream pushbackStream = new
PushbackInputStream(inputStream);
Review Comment:
btw, thanks for your asking
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]