[Issue 18318] std.net.curl.download silently ignores non-2xx http statuses
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 31 00:48:07 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18318
--- Comment #4 from Martin Nowak <code at dawg.eu> ---
(In reply to Aravinda from comment #2)
> auto conn = HTTP(url);
> download(url, "tmp", conn);
> auto status = conn.statusLine();
> if (status.code == 200){
Thanks, that's a helpful workaround for the time being.
But by default, high-level functions should throw on errors, so that they
aren't accidentally ignored.
--
More information about the Digitalmars-d-bugs
mailing list