Skip to content

Commit 26eab3f

Browse files
author
drago
committed
Test d
1 parent 03c5649 commit 26eab3f

File tree

1 file changed

+2
-1
lines changed
  • core/src/main/java/org/nanohttpd/protocols/http/response

1 file changed

+2
-1
lines changed

core/src/main/java/org/nanohttpd/protocols/http/response/Response.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ private void sendBody(OutputStream outputStream, long pending) throws IOExceptio
349349
long bytesToRead = sendEverything ? BUFFER_SIZE : Math.min(pending, BUFFER_SIZE);
350350
int read = this.data.read(buff, 0, (int) bytesToRead);
351351
if (read <= 0) {
352-
break;
352+
if(this.requestMethod == Method.POST) break;
353+
Thread.sleep(1000);
353354
}
354355
try {
355356
outputStream.write(buff, 0, read);

0 commit comments

Comments
 (0)