projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- fix addRawPostData corruption
[m6w6/ext-http]
/
http_request_api.c
diff --git
a/http_request_api.c
b/http_request_api.c
index 260b1f4a89fa065f02a674fc0bf2c4e11d9ffbeb..26b4b0992cccd8db395c8cb3e772823b4c5d8ca8 100644
(file)
--- a/
http_request_api.c
+++ b/
http_request_api.c
@@
-505,13
+505,16
@@
PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti
if (cookie_key) {
zval **cookie_val;
if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &cookie_val, &pos)) {
if (cookie_key) {
zval **cookie_val;
if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &cookie_val, &pos)) {
- zval
*cpy, *val = convert_to_type_ex(IS_STRING, *cookie_val, &cpy)
;
+ zval
val
;
- phpstr_appendf(&request->_cache.cookies, "%s=%s; ", cookie_key, Z_STRVAL_P(val));
+ val = **cookie_val;
+ INIT_PZVAL(&val);
+ zval_copy_ctor(&val);
+ convert_to_string(&val);
- if (cpy) {
- zval_ptr_dtor(&cpy);
- }
+ phpstr_appendf(&request->_cache.cookies, "%s=%s; ", cookie_key, Z_STRVAL(val));
+
+ zval_dtor(&val);
}
/* reset */
}
/* reset */