Message ID | pull.1225.git.1650970894143.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Added Curl Option to Override Request Method | expand |
diff --git a/http.c b/http.c index 229da4d1488..2ca13b848a5 100644 --- a/http.c +++ b/http.c @@ -1235,6 +1235,8 @@ struct active_request_slot *get_active_slot(void) curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods); if (http_auth.password || curl_empty_auth_enabled()) init_curl_http_auth(slot->curl); + if(getenv("CURLOPT_CUSTOMREQUEST")) + curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, getenv("CURLOPT_CUSTOMREQUEST")); return slot; }