projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
a17cd48
)
* don't enable compression by default
author
Michael Wallner
<mike@php.net>
Thu, 24 Feb 2005 19:19:55 +0000
(19:19 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 24 Feb 2005 19:19:55 +0000
(19:19 +0000)
http_curl_api.c
patch
|
blob
|
history
diff --git
a/http_curl_api.c
b/http_curl_api.c
index 24524ced68d42af020016b7df7d27b8fad825b27..dbd244071fcc91c377605ddc1d3e002e0ff14cbd 100644
(file)
--- a/
http_curl_api.c
+++ b/
http_curl_api.c
@@
-48,7
+48,7
@@
ZEND_DECLARE_MODULE_GLOBALS(http)
} \
http_curl_initbuf(); \
http_curl_setopts(ch, URL, options);
} \
http_curl_initbuf(); \
http_curl_setopts(ch, URL, options);
-
+
#define http_curl_cleanup(ch, clean_curl) \
http_curl_freestr(); \
#define http_curl_cleanup(ch, clean_curl) \
http_curl_freestr(); \
@@
-98,7
+98,7
@@
ZEND_DECLARE_MODULE_GLOBALS(http)
HTTP_G(curlbuf).free += bsize; \
} \
}
HTTP_G(curlbuf).free += bsize; \
} \
}
-
+
#define http_curl_copystr(s) _http_curl_copystr((s) TSRMLS_CC)
static inline char *_http_curl_copystr(const char *str TSRMLS_DC);
#define http_curl_copystr(s) _http_curl_copystr((s) TSRMLS_CC)
static inline char *_http_curl_copystr(const char *str TSRMLS_DC);
@@
-253,8
+253,6
@@
static inline void _http_curl_setopts(CURL *ch, const char *url, HashTable *opti
if (Z_LVAL_P(zoption)) {
curl_easy_setopt(ch, CURLOPT_ENCODING, "");
}
if (Z_LVAL_P(zoption)) {
curl_easy_setopt(ch, CURLOPT_ENCODING, "");
}
- } else {
- curl_easy_setopt(ch, CURLOPT_ENCODING, "");
}
/* another port */
}
/* another port */
@@
-506,7
+504,7
@@
PHP_HTTP_API STATUS _http_get_ex(CURL *ch, const char *URL, HashTable *options,
HashTable *info, char **data, size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
HashTable *info, char **data, size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
-
+
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_NOBODY, 0);
curl_easy_setopt(ch, CURLOPT_POST, 0);
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_NOBODY, 0);
curl_easy_setopt(ch, CURLOPT_POST, 0);
@@
-516,14
+514,14
@@
PHP_HTTP_API STATUS _http_get_ex(CURL *ch, const char *URL, HashTable *options,
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
-
+
if (info) {
http_curl_getinfo(ch, info);
}
if (info) {
http_curl_getinfo(ch, info);
}
-
+
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
-
+
return SUCCESS;
}
return SUCCESS;
}
@@
-532,7
+530,7
@@
PHP_HTTP_API STATUS _http_head_ex(CURL *ch, const char *URL, HashTable *options,
HashTable *info, char **data, size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
HashTable *info, char **data, size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
-
+
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_NOBODY, 1);
curl_easy_setopt(ch, CURLOPT_POST, 0);
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_NOBODY, 1);
curl_easy_setopt(ch, CURLOPT_POST, 0);
@@
-542,14
+540,14
@@
PHP_HTTP_API STATUS _http_head_ex(CURL *ch, const char *URL, HashTable *options,
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
-
+
if (info) {
http_curl_getinfo(ch, info);
}
if (info) {
http_curl_getinfo(ch, info);
}
-
+
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
-
+
return SUCCESS;
}
return SUCCESS;
}
@@
-559,7
+557,7
@@
PHP_HTTP_API STATUS _http_post_data_ex(CURL *ch, const char *URL, char *postdata
size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
-
+
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_POST, 1);
curl_easy_setopt(ch, CURLOPT_POSTFIELDS, postdata);
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_POST, 1);
curl_easy_setopt(ch, CURLOPT_POSTFIELDS, postdata);
@@
-570,14
+568,14
@@
PHP_HTTP_API STATUS _http_post_data_ex(CURL *ch, const char *URL, char *postdata
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
-
+
if (info) {
http_curl_getinfo(ch, info);
}
if (info) {
http_curl_getinfo(ch, info);
}
-
+
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
-
+
return SUCCESS;
}
/* }}} */
return SUCCESS;
}
/* }}} */
@@
-616,7
+614,7
@@
PHP_HTTP_API STATUS _http_post_curldata_ex(CURL *ch, const char *URL,
char **data, size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
char **data, size_t *data_len TSRMLS_DC)
{
zend_bool clean_curl = 0;
-
+
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_POST, 1);
curl_easy_setopt(ch, CURLOPT_HTTPPOST, curldata);
http_curl_startup(ch, clean_curl, URL, options);
curl_easy_setopt(ch, CURLOPT_POST, 1);
curl_easy_setopt(ch, CURLOPT_HTTPPOST, curldata);
@@
-626,14
+624,14
@@
PHP_HTTP_API STATUS _http_post_curldata_ex(CURL *ch, const char *URL,
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
return FAILURE;
}
-
+
if (info) {
http_curl_getinfo(ch, info);
}
if (info) {
http_curl_getinfo(ch, info);
}
-
+
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
http_curl_copybuf(data, data_len);
http_curl_cleanup(ch, clean_curl);
-
+
return SUCCESS;
}
/* }}} */
return SUCCESS;
}
/* }}} */