When a server responds with Content-Length: 0
during the server resource pack download, the download fails with a division-by-zero error.
[22:25:14] [Download-2/ERROR]: Failed to download http://192.168.0.200:8000/test
java.lang.IllegalStateException: Failed to download file http://192.168.0.200:8000/test
at aue.a(SourceFile:127) ~[minecraft-1.20.3-pre1-client.jar:?]
at aor.a(SourceFile:103) ~[minecraft-1.20.3-pre1-client.jar:?]
at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
at aor.b(SourceFile:99) ~[minecraft-1.20.3-pre1-client.jar:?]
at aor.c(SourceFile:136) ~[minecraft-1.20.3-pre1-client.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at bit.h(SourceFile:91) ~[minecraft-1.20.3-pre1-client.jar:?]
at bit.a(SourceFile:146) ~[minecraft-1.20.3-pre1-client.jar:?]
at bit.run(SourceFile:102) ~[minecraft-1.20.3-pre1-client.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.ArithmeticException: / by zero
at gha$1.b(SourceFile:102) ~[minecraft-1.20.3-pre1-client.jar:?]
at gha$1.a(SourceFile:121) ~[minecraft-1.20.3-pre1-client.jar:?]
at aue.a(SourceFile:87) ~[minecraft-1.20.3-pre1-client.jar:?]
... 11 more
Comments 3
The steps to reproduce are to write a web server that returns a Content-Length: 0 header and point the server resource pack URL to it. The exact resource pack used doesn't matter since the issue is in the headers, not arbitrary data that may or may not be exist or associated with any file.
Can you provide steps to reproduce? What was the resource pack?
Here is a template that you can use:
[Briefly describe the bug here]
Steps to Reproduce:
[Step 1]
[Step 2]
[Step 3]
Observed Results:
[Describe what happens]
Expected Results:
[Describe what should happen]
Screenshots/Videos:
[Optional: Attach an image or short video]
Notes:
[Any further information you can provide about the bug, such as explaining any attachments you’re including, when the bug started to occur, how you’ve tested the bug,
messages displayed (e.g., error messages), and how the bug impacts gameplay.]