HTTP_CURL_OPT(IOCTLDATA, NULL);
HTTP_CURL_OPT(READDATA, NULL);
HTTP_CURL_OPT(INFILESIZE, 0);
+ HTTP_CURL_OPT(HTTP_VERSION, CURL_HTTP_VERSION_NONE);
}
}
/* }}} */
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:
/* WebDAV Access Control - RFC 3744 */
DCL_CONST(long, "METH_ACL", HTTP_ACL);
+ /* cURL HTTP protocol versions */
+ DCL_CONST(long, "VERSION_1_0", CURL_HTTP_VERSION_1_0);
+ DCL_CONST(long, "VERSION_1_1", CURL_HTTP_VERSION_1_1);
+ DCL_CONST(long, "VERSION_NONE", CURL_HTTP_VERSION_NONE);
+
/*
* Auth Constants
*/