if (!content.markSupported())
content = new SdkBufferedInputStream(content);
final InputStream is = ProgressInputStream.inputStreamForRequest(content, awsreq);
if (AmazonHttpClient.unreliableTestConfig == null)
return is;
return new UnreliableFilterInputStream
(is, unreliableTestConfig.isFakeIOException())
.withBytesReadBeforeException(
unreliableTestConfig.getBytesReadBeforeException())
.withMaxNumErrors(
unreliableTestConfig.getMaxNumErrors())