HTTP_CURL_OPT(IOCTLDATA, NULL);
HTTP_CURL_OPT(READDATA, NULL);
HTTP_CURL_OPT(INFILESIZE, 0);
+ HTTP_CURL_OPT(HTTP_VERSION, CURL_HTTP_VERSION_NONE);
}
}
/* }}} */
}
}
if ((zoption = http_request_option(request, options, "compress", IS_BOOL)) && Z_LVAL_P(zoption)) {
- request->_cache.headers = curl_slist_append(request->_cache.headers, "Accept-Encoding: gzip;q=1.0,deflate;q=0.5,*;q=0.1");
+ request->_cache.headers = curl_slist_append(request->_cache.headers, "Accept-Encoding: gzip;q=1.0,deflate;q=0.5");
}
HTTP_CURL_OPT(HTTPHEADER, request->_cache.headers);
HTTP_CURL_OPT(MAXFILESIZE, Z_LVAL_P(zoption));
}
+ /* http protocol */
+ if ((zoption = http_request_option(request, options, "protocol", IS_LONG))) {
+ HTTP_CURL_OPT(HTTP_VERSION, Z_LVAL_P(zoption));
+ }
+
/* lastmodified */
if ((zoption = http_request_option(request, options, "lastmodified", IS_LONG))) {
if (Z_LVAL_P(zoption)) {
}
/* attach request body */
- if (request->body && (request->meth != HTTP_GET) && (request->meth != HTTP_HEAD)) {
+ if (request->body && (request->meth != HTTP_GET) && (request->meth != HTTP_HEAD) && (request->meth != HTTP_OPTIONS)) {
switch (request->body->type)
{
case HTTP_REQUEST_BODY_CSTRING:
}
static struct gcry_thread_cbs http_gnutls_tsl = {
- GCRY_THREAD_OPTIONS_USER,
+ GCRY_THREAD_OPTION_USER,
NULL,
http_ssl_mutex_create,
http_ssl_mutex_destroy,