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:
3d6705f
)
fix httpVersion retrieval on bigendian
author
Remi Collet
<remi@php.net>
Wed, 3 Sep 2014 13:31:33 +0000
(15:31 +0200)
committer
Remi Collet
<remi@php.net>
Wed, 3 Sep 2014 13:31:33 +0000
(15:31 +0200)
php_http_message.c
patch
|
blob
|
history
diff --git
a/php_http_message.c
b/php_http_message.c
index 70dcae82c933e68c9927b1dd5ed404a61b086e07..3141065f8353466ff9edb9003a0400397daa2ed3 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-940,6
+940,7
@@
static HashTable *php_http_message_object_get_props(zval *object TSRMLS_DC)
HashTable *props = zend_get_std_object_handlers()->get_properties(object TSRMLS_CC);
zval array, *parent, *body;
char *version;
HashTable *props = zend_get_std_object_handlers()->get_properties(object TSRMLS_CC);
zval array, *parent, *body;
char *version;
+ int verlen;
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
INIT_PZVAL_ARRAY(&array, props);
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
INIT_PZVAL_ARRAY(&array, props);
@@
-963,7
+964,8
@@
static HashTable *php_http_message_object_get_props(zval *object TSRMLS_DC)
} while(0)
ASSOC_PROP(long, "type", obj->message->type);
} while(0)
ASSOC_PROP(long, "type", obj->message->type);
- ASSOC_STRINGL_EX("httpVersion", version, spprintf(&version, 0, "%u.%u", obj->message->http.version.major, obj->message->http.version.minor), 0);
+ verlen = spprintf(&version, 0, "%u.%u", obj->message->http.version.major, obj->message->http.version.minor);
+ ASSOC_STRINGL_EX("httpVersion", version, verlen, 0);
switch (obj->message->type) {
case PHP_HTTP_REQUEST:
switch (obj->message->type) {
case PHP_HTTP_REQUEST: