forked from enlightenment/efl
add ecore_con_url_http_version_set() to be able to specify request
version SVN revision: 67759
This commit is contained in:
parent
b7efefd294
commit
6c31fcf709
|
@ -477,3 +477,8 @@
|
||||||
2012-02-07 Jihoon Kim (jihoon)
|
2012-02-07 Jihoon Kim (jihoon)
|
||||||
|
|
||||||
* Support ecore_imf_context_input_panel_show/hide in XIM and SCIM module.
|
* Support ecore_imf_context_input_panel_show/hide in XIM and SCIM module.
|
||||||
|
|
||||||
|
2012-02-08 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
|
* Add ecore_con_url_http_version_set() to set url request version
|
||||||
|
|
||||||
|
|
|
@ -1334,6 +1334,32 @@ typedef enum _Ecore_Con_Url_Time
|
||||||
ECORE_CON_URL_TIME_IFUNMODSINCE
|
ECORE_CON_URL_TIME_IFUNMODSINCE
|
||||||
} Ecore_Con_Url_Time;
|
} Ecore_Con_Url_Time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef Ecore_Con_Url_Http_Version
|
||||||
|
* @enum _Ecore_Con_Url_Http_Version
|
||||||
|
* The http version to use
|
||||||
|
*/
|
||||||
|
typedef enum _Ecore_Con_Url_Http_Version
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* HTTP version 1.0
|
||||||
|
*/
|
||||||
|
ECORE_CON_URL_HTTP_VERSION_1_0,
|
||||||
|
/**
|
||||||
|
* HTTP version 1.1 (default)
|
||||||
|
*/
|
||||||
|
ECORE_CON_URL_HTTP_VERSION_1_1
|
||||||
|
} Ecore_Con_Url_Http_Version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the HTTP version used for the request
|
||||||
|
* @param version The version to be used
|
||||||
|
* @return EINA_TRUE on success, EINA_FALSE on failure to change version
|
||||||
|
*
|
||||||
|
* @see ecore_con_url_pipeline_get()
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool ecore_con_url_http_version_set(Ecore_Con_Url *url_con, Ecore_Con_Url_Http_Version version);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises the Ecore_Con_Url library.
|
* Initialises the Ecore_Con_Url library.
|
||||||
* @return Number of times the library has been initialised without being
|
* @return Number of times the library has been initialised without being
|
||||||
|
|
|
@ -1096,6 +1096,34 @@ ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
ecore_con_url_http_version_set(Ecore_Con_Url *url_con, Ecore_Con_Url_Http_Version version)
|
||||||
|
{
|
||||||
|
int res = -1;
|
||||||
|
|
||||||
|
switch (version)
|
||||||
|
{
|
||||||
|
case ECORE_CON_URL_HTTP_VERSION_1_0:
|
||||||
|
res = curl_easy_setopt(url_con->curl_easy,
|
||||||
|
CURLOPT_HTTP_VERSION,
|
||||||
|
CURL_HTTP_VERSION_1_0);
|
||||||
|
break;
|
||||||
|
case ECORE_CON_URL_HTTP_VERSION_1_1:
|
||||||
|
res = curl_easy_setopt(url_con->curl_easy,
|
||||||
|
CURLOPT_HTTP_VERSION,
|
||||||
|
CURL_HTTP_VERSION_1_1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (res != CURLE_OK)
|
||||||
|
{
|
||||||
|
ERR("curl http version setting failed: %s", curl_easy_strerror(res));
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy)
|
ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue