There is something wrong with HTTPClient. I can't download any page.
Windows 7 64, dmd 2.063.2, vibe.d last master.
This code
import vibe.d;
shared static this() {
runTask({
logInfo("start task");
requestHTTP("http://vibed.org", (scope req) {}, (scope res) {
logInfo("downloading");
string data = res.bodyReader.readAllUTF8();
logInfo("length = %s", data.length);
});
logInfo("end task");
});
}
prints
d:\tmp\test>test --vvv
[02250F80:00000000 dbg] Create FreeListAlloc 8
[02250F80:00000000 dbg] Create FreeListAlloc 16
[02250F80:00000000 dbg] Create FreeListAlloc 32
[02250F80:00000000 dbg] Create FreeListAlloc 64
[02250F80:00000000 dbg] Create FreeListAlloc 128
[02250F80:00000000 dbg] Create FreeListAlloc 256
[02250F80:00000000 dbg] Create FreeListAlloc 512
[02250F80:00000000 dbg] Create FreeListAlloc 1024
[02250F80:00000000 dbg] Create FreeListAlloc 2048
[02250F80:00000000 dbg] Create FreeListAlloc 65540
[02250F80:00000000 dia] libevent version: 2.0.20-stable
[02250F80:00000000 dia] libevent is using win32 for events.
[02250F80:00000000 dbg] Initializing OpenSSL...
[02250F80:00000000 dbg] ... done.
[02250F80:00000000 dbg] Creating new fiber...
[02250F80:00000000 dia] Running event loop...
start task
[02250F80:02250E80 dbg] creating new HTTPClient connection, all 0 are in use
[02250F80:02250E80 dbg] ... 2252C00
[02250F80:02250E80 dbg] Now got 1 connections
[02250F80:02250E80 dbg] Disconnected to avoid timeout
[02250F80:02250E80 dbg] dnsresolve
[02250F80:02250E80 dbg] dnsresolve yield
[02250F80:02250E80 dbg] dnsresolve ret 0
[02250F80:00000000 dbg] Socket event on fd 328: 128 (2C88E4 vs 2C88E4)
package.json
{
"name": "test",
"dependencies": {
"vibe-d": "~master"
}
}