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 (parent:
c5c580f
)
ensure the merged header IS_STRING
author
Michael Wallner
<mike@php.net>
Thu, 9 Sep 2010 12:45:57 +0000
(12:45 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 9 Sep 2010 12:45:57 +0000
(12:45 +0000)
php_http_message.c
patch
|
blob
|
history
diff --git
a/php_http_message.c
b/php_http_message.c
index c1c82e98e453bce6604d131adc76d32ac9a4ba5a..da0ac7d2331e8bc91aa919f1ce001edd8c04d555 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-158,7
+158,9
@@
PHP_HTTP_API zval *php_http_message_header(php_http_message_t *msg, char *key_st
php_http_buffer_init(&str);
MAKE_STD_ZVAL(header_str);
FOREACH_VAL(pos, *header, val) {
php_http_buffer_init(&str);
MAKE_STD_ZVAL(header_str);
FOREACH_VAL(pos, *header, val) {
- php_http_buffer_appendf(&str, PHP_HTTP_BUFFER_LEN(&str) ? ", %s":"%s", Z_STRVAL_PP(val));
+ zval *strval = php_http_zsep(IS_STRING, *val);
+ php_http_buffer_appendf(&str, PHP_HTTP_BUFFER_LEN(&str) ? ", %s":"%s", Z_STRVAL_P(strval));
+ zval_ptr_dtor(&strval);
}
php_http_buffer_fix(&str);
ZVAL_STRINGL(header_str, PHP_HTTP_BUFFER_VAL(&str), PHP_HTTP_BUFFER_LEN(&str), 0);
}
php_http_buffer_fix(&str);
ZVAL_STRINGL(header_str, PHP_HTTP_BUFFER_VAL(&str), PHP_HTTP_BUFFER_LEN(&str), 0);