Skip to content

Commit

Permalink
forces HTTP1.1 to fix issue #36
Browse files Browse the repository at this point in the history
  • Loading branch information
fangfufu committed Jul 20, 2019
1 parent 78d8167 commit 4491377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ static CURL *Link_to_curl(Link *link)
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
curl_easy_setopt(curl, CURLOPT_SHARE, CURL_SHARE);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_memory_callback);
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);



if (NETWORK_CONFIG.username) {
curl_easy_setopt(curl, CURLOPT_USERNAME, NETWORK_CONFIG.username);
}
Expand Down
1 change: 0 additions & 1 deletion src/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ LinkTable *network_init(const char *url)
NETWORK_CONFIG.max_conns);
curl_multi_setopt(curl_multi, CURLMOPT_MAX_HOST_CONNECTIONS,
NETWORK_CONFIG.max_conns);
curl_multi_setopt(curl_multi, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);

/* ------------ Initialise locks ---------*/
if (pthread_mutex_init(&transfer_lock, NULL)) {
Expand Down

0 comments on commit 4491377

Please sign in to comment.