Bug 14793 – net.curl.download https broken - windows

Status
CLOSED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2015-07-11T11:16:00Z
Last change time
2017-08-03T20:09:16Z
Assigned to
nobody
Creator
kdansky

Comments

Comment #0 by kdansky — 2015-07-11T11:16:50Z
curl does not work properly with https on windows: http = HTTP(); http.handle.set(etc.c.curl.CurlOption.ssl_verifypeer, 0); // do not verify ssl string content = std.net.curl.get("https://.....", http).idup; // works std.net.curl.download("https:// .... ", localpath, http); //crashes Only download is affected, .get works fine (with deactivated ssl). Probably windows-only.
Comment #1 by dlang-bugzilla — 2015-08-31T12:50:46Z
I can't reproduce this, can you post a full program with working URLs? The download function was broken during 2.068 development, but was fixed before release: issue 14712
Comment #2 by dlang-bugzilla — 2017-07-01T18:55:42Z
Can't reproduce and no reply in over a year, closing.
Comment #3 by yuri.korchyomkin — 2017-08-02T23:10:27Z
Reproes with DMD32 D Compiler v2.073.0 Minimal repro: import std.stdio; import std.net.curl; void main() { download("https://avatars1.githubusercontent.com/u/8682279?v=4&s=40", "avatar.png"); } Expected: file downloaded. Actual: error with stacktrace: object.Error@(0): Access Violation ---------------- 0x62E8E685 0x004CA2B0 in core.sync.mutex.Mutex std.concurrency.initOnceLock().lock 0x100124A5 0x00403D51 in void std.net.curl.download!(std.net.curl.AutoProtocol).download(const(char)[], immutable(char)[], std.net.curl.AutoProtocol) at C:\ProgramData\chocolatey\lib\dmd\tools\dmd2\windows\bin\..\..\src\phobos\std\net\curl.d(414) 0x00402035 in _Dmain at D:\tmp\D\curl_bug\source\app.d(6) 0x004050B3 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv 0x00405077 in void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() 0x00404F78 in _d_run_main 0x00404D68 in main at D:\tmp\D\curl_bug\source\app.d(7) 0x00472291 in mainCRTStartup 0x76E462C4 in BaseThreadInitThunk 0x77830FD9 in RtlSubscribeWnfStateChangeNotification 0x77830FA4 in RtlSubscribeWnfStateChangeNotification
Comment #4 by dlang-bugzilla — 2017-08-03T03:46:05Z
*** This issue has been marked as a duplicate of issue 17622 ***
Comment #5 by dlang-bugzilla — 2017-08-03T03:57:55Z
Actually the timeline doesn't match up with 17622's. (In reply to Yury Korchemkin from comment #3) > Reproes with DMD32 D Compiler v2.073.0 Can't reproduce here with that version. Try 2.075.0?
Comment #6 by yuri.korchyomkin — 2017-08-03T18:32:09Z
Figured that out — the problem was with libcurl.dll being not installed on the machine and not copied into the folder with executable. Copying the DLL solved the problem. Resolving the bug.
Comment #7 by dlang-bugzilla — 2017-08-03T20:09:16Z
If there is a reproducible problem with the installer not installing libcurl properly, please file that separately.