Hacker News new | ask | show | jobs
by dobladov 1666 days ago
curl --max-time 1 https://youcantdownloadthisimage.online/lisa.jpg > lisa.jpg
2 comments

Add -N, --no-buffer Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering.

and it works

Results in an empty file.
Increase the time a bit, it looks like sometimes it takes more time to download curl --max-time 2 https://youcantdownloadthisimage.online/lisa.jpg > lisa.jpg
Nevermind, looks like MobaXterm shell provides a non-standard curl implementation:

$ which curl

curl: aliased to _tob curl

After installing curl with apt-get it works.

I hate it when people do that. You can wonder for hours why something obvious doesn't work as it should and in the end discover someone decided to implement something substandard, often for no good reason.
that's every distro and *nix derivation
Well, Windows too. I recently had to set up something simple on a Windows 10 machine, I quickly checked by tab-completion if a python binary is available so I copied by setup script only to discover someone smart decided to redirect the binary to the Windows Store. Yes, I know the rationale behind this, but still. Just like hijacking nxdomain.
And powershell!