File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -110,15 +110,18 @@ bool HttpsClient::download(const std::string &uri) {
110110 curl_easy_setopt (curl, CURLOPT_WRITEDATA, this );
111111
112112 curl_easy_setopt (curl, CURLOPT_USERAGENT, " ModSecurity3" );
113- curl_easy_setopt (curl, CURLOPT_HTTPHEADER, headers_chunk);
114113
115114 /* We want Curl to return error in case there is an HTTP error code */
116115 curl_easy_setopt (curl, CURLOPT_FAILONERROR, 1 );
117116
118117 if (m_requestBody.empty () == false ) {
119118 curl_easy_setopt (curl, CURLOPT_POSTFIELDS, m_requestBody.c_str ());
119+ headers_chunk = curl_slist_append (headers_chunk, " Expect:" ); // Disable Expect: 100-continue
120120 }
121121
122+ /* set HTTP headers for request */
123+ curl_easy_setopt (curl, CURLOPT_HTTPHEADER, headers_chunk);
124+
122125 res = curl_easy_perform (curl);
123126
124127 curl_slist_free_all (headers_chunk);
You can’t perform that action at this time.
0 commit comments