mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-22 07:36:36 +02:00
Resolve files will not download when using curl 7.62.0 (http2 issue) (#225)
* Force connections to use HTTP 1.1 as Curl 7.62.0 defaults to using http2 if h2 support is built in which causes issues
This commit is contained in:
parent
eb2cbfd0a8
commit
11e477f045
|
@ -1,4 +1,5 @@
|
|||
import std.net.curl: CurlException, HTTP;
|
||||
import std.net.curl;
|
||||
import etc.c.curl: CurlOption;
|
||||
import std.datetime, std.exception, std.file, std.json, std.path;
|
||||
import std.stdio, std.string, std.uni, std.uri;
|
||||
import core.stdc.stdlib;
|
||||
|
@ -58,6 +59,11 @@ final class OneDriveApi
|
|||
http = HTTP();
|
||||
http.dnsTimeout = (dur!"seconds"(5));
|
||||
http.dataTimeout = (dur!"seconds"(3600));
|
||||
|
||||
// Specify which HTTP version to use
|
||||
// Curl 7.62.0 defaults to http2, we need to use http 1.1
|
||||
http.handle.set(CurlOption.http_version,2);
|
||||
|
||||
if (debugHttp) {
|
||||
http.verbose = true;
|
||||
.debugResponse = true;
|
||||
|
|
Loading…
Reference in a new issue