diff --git a/http.c b/http.c index 0cb42a8..12ea126 100644 --- a/http.c +++ b/http.c @@ -26,6 +26,7 @@ long curl_low_speed_time = -1; struct curl_slist *pragma_header; struct curl_slist *no_range_header; +struct curl_slist *no_dav_headers; struct active_request_slot *active_queue_head = NULL; @@ -209,6 +210,8 @@ void http_init(void) pragma_header = curl_slist_append(pragma_header, "Pragma: no-cache"); no_range_header = curl_slist_append(no_range_header, "Range:"); + no_dav_headers = curl_slist_append(no_dav_headers, "Depth:"); + no_dav_headers = curl_slist_append(no_dav_headers, "Content-type:"); #ifdef USE_CURL_MULTI { @@ -344,8 +347,10 @@ #endif slot->finished = NULL; slot->callback_data = NULL; slot->callback_func = NULL; + curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, NULL); curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, pragma_header); curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, no_range_header); + curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, no_dav_headers); curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr); return slot;