projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
* docs
[m6w6/ext-http]
/
http.c
diff --git
a/http.c
b/http.c
index b606bc3813c440ff726ec336ea80a75a5d063cac..9b5c7f6116165f143728bde2b8a81cd947109db3 100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-35,6
+35,7
@@
#include "php_http.h"
#include "php_http_api.h"
#include "php_http_curl_api.h"
#include "php_http.h"
#include "php_http_api.h"
#include "php_http_curl_api.h"
+#include "php_http_std_defs.h"
#ifdef ZEND_ENGINE_2
# include "ext/standard/php_http.h"
#ifdef ZEND_ENGINE_2
# include "ext/standard/php_http.h"
@@
-337,7
+338,8
@@
zend_function_entry httpi_request_class_methods[] = {
PHP_ME(HTTPi_Request, send, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, getResponseData, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, send, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, getResponseData, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HTTPi_Request, getResponseHeaders, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(HTTPi_Request, getResponseHeader, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(HTTPi_Request, getResponseCode, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, getResponseBody, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, getResponseInfo, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, getResponseBody, NULL, ZEND_ACC_PUBLIC)
PHP_ME(HTTPi_Request, getResponseInfo, NULL, ZEND_ACC_PUBLIC)
@@
-368,6
+370,12
@@
zend_module_entry http_module_entry = {
};
/* }}} */
};
/* }}} */
+
+static void free_to_free(void *s)
+{
+ efree(*(char **)s);
+}
+
/* {{{ php_http_init_globals(zend_http_globals *) */
static void php_http_init_globals(zend_http_globals *http_globals)
{
/* {{{ php_http_init_globals(zend_http_globals *) */
static void php_http_init_globals(zend_http_globals *http_globals)
{
@@
-380,6
+388,7
@@
static void php_http_init_globals(zend_http_globals *http_globals)
http_globals->curlbuf.used = 0;
http_globals->curlbuf.free = 0;
http_globals->curlbuf.size = 0;
http_globals->curlbuf.used = 0;
http_globals->curlbuf.free = 0;
http_globals->curlbuf.size = 0;
+ zend_llist_init(&http_globals->to_free, sizeof(char *), free_to_free, 0);
#endif
http_globals->allowed_methods = NULL;
}
#endif
http_globals->allowed_methods = NULL;
}
@@
-470,6
+479,7
@@
PHP_RSHUTDOWN_FUNCTION(http)
efree(HTTP_G(ctype));
HTTP_G(ctype) = NULL;
}
efree(HTTP_G(ctype));
HTTP_G(ctype) = NULL;
}
+
#ifdef HTTP_HAVE_CURL
if (HTTP_G(curlbuf).data) {
efree(HTTP_G(curlbuf).data);
#ifdef HTTP_HAVE_CURL
if (HTTP_G(curlbuf).data) {
efree(HTTP_G(curlbuf).data);
@@
-478,6
+488,7
@@
PHP_RSHUTDOWN_FUNCTION(http)
HTTP_G(curlbuf).free = 0;
}
#endif
HTTP_G(curlbuf).free = 0;
}
#endif
+
return SUCCESS;
}
/* }}} */
return SUCCESS;
}
/* }}} */