Failed to download the whole file served by HttpFile by wget or curl
See original GitHub issueWhen I am serving a file with size over 70MB, wget or curl gets connection closed at around 30%
public class Main
{
public static void main(String[] args)
{
Server server = Server.builder()
.http(8080)
.service("/test.txt", HttpFile.of(new File("C:\\temp\\20210727.txt")).asService())
.build();
CompletableFuture<Void> future = server.start();
future.join();
}
}
wget http://my-machine:8080/test.zip
--2022-06-09 00:01:46-- http://my-machine:8080/test.zip
Resolving ... 10.71.111.209
Connecting to ...|10.71.111.209|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857953 (100M) [text/plain]
Saving to: ‘test.zip.1’
test.zip.1 31%[==============> ] 31.67M 3.04MB/s in 10s
2022-06-09 00:02:12 (3.07 MB/s) - Connection closed at byte 33210368. Retrying.
I have no idea why it fails but other web server (like npm serve) and does not have any issue note that browser does not suffer from this issue
Issue Analytics
- State:
- Created a year ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Why does curl not work, but wget works? - Stack Overflow
For curl, it returns no output at all, but with wget, it returns the entire HTML source: Here are the 2 commands. I've...
Read more >wget and curl stop very quickly and failed to download a file?
Adding a -v parameter to either curl or wget commands will show you that what you download has the text/html MIME-type, so a...
Read more >Linux wget command help and examples - Computer Hope
wget is a free utility for non-interactive download of files from the web. ... it keeps retrying until the whole file is retrieved....
Read more >Downloading files with curl
Downloading files with curl. How to download files straight from the command-line interface. The curl tool lets us fetch a given URL from...
Read more >Error while downloading HTTPS files using wget - Ask Ubuntu
My problem is, I can't download http files in my college wifi. So when I try to download the file, wget will send...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ikhoon We may want to introduce a decorator that aborts the stream when there’s not enough traffic for a certain period of time, e.g. Abort the connection if less than 64KiB was transferred for the last 10 seconds.
Thanks, that would be awesome and helps anyone that would use armeria to serve something big