gitattributes
[m6w6/ext-http] / php_http_client_curl.c
index cc5e8104f83573d5294d02ad25f6077477b7b7ab..c6918426264ea3fa32df358a5f208c2ba14d63b5 100644 (file)
@@ -1492,8 +1492,8 @@ static STATUS php_http_client_curl_handler_prepare(php_http_client_curl_handler_
                        }
                }
                php_http_buffer_dtor(&header);
-               curl_easy_setopt(curl->handle, CURLOPT_HTTPHEADER, curl->options.headers);
        }
+       curl_easy_setopt(curl->handle, CURLOPT_HTTPHEADER, curl->options.headers);
 
        /* attach request body */
        if ((body_size = php_http_message_body_size(msg->body))) {
@@ -1807,7 +1807,7 @@ static STATUS php_http_client_curl_exec(php_http_client_t *h)
                                /* see http://msdn.microsoft.com/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp */
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "WinSock error: %d", WSAGetLastError());
 #else
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, strerror(errno));
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
 #endif
                                return FAILURE;
                        }