Skip to content

Commit 16f1016

Browse files
authored
Merge pull request #2460 from sswguo/tryfix_downloads
Add flush after copy during downloads
2 parents 2c86c45 + 8a9396c commit 16f1016

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bindings/jaxrs/src/main/java/org/commonjava/indy/core/bind/jaxrs/util/TransferStreamingOutput.java

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public void write( final OutputStream out )
6565
{
6666
CountingOutputStream cout = new CountingOutputStream( out );
6767
IOUtils.copy( stream, cout );
68+
cout.flush(); // ensure any remaining data is written to the output stream
6869

6970
Logger logger = LoggerFactory.getLogger( getClass() );
7071
logger.trace( "Wrote: {} bytes", cout.getByteCount() );

0 commit comments

Comments
 (0)