projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
missed that part
[m6w6/ext-http]
/
http_request_api.c
diff --git
a/http_request_api.c
b/http_request_api.c
index c3e612835cdf5789a7927e6f025c9be0479f3edd..85144807f1b6a9e489eb2c7b9d9cbad529059c1b 100644
(file)
--- a/
http_request_api.c
+++ b/
http_request_api.c
@@
-471,14
+471,12
@@
PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti
zval **header_val;
if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &header_val, &pos)) {
char header[1024] = {0};
zval **header_val;
if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &header_val, &pos)) {
char header[1024] = {0};
- zval *cpy, *val = convert_to_type_ex(IS_STRING, *header_val, &cpy);
-
snprintf(header, 1023, "%s: %s", header_key, Z_STRVAL_P(val)
);
-
request->_cache.headers = curl_slist_append(request->_cache.headers, header
);
+
SEPARATE_ZVAL(header_val
);
+
convert_to_string(*header_val
);
- if (cpy) {
- zval_ptr_dtor(&cpy);
- }
+ snprintf(header, 1023, "%s: %s", header_key, Z_STRVAL_PP(header_val));
+ request->_cache.headers = curl_slist_append(request->_cache.headers, header);
}
/* reset */
}
/* reset */