projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
(from parent 1:
a9934a7
)
Merge branch 'R_2_0'
author
Michael Wallner
<mike@php.net>
Tue, 8 Jul 2014 10:14:04 +0000
(12:14 +0200)
committer
Michael Wallner
<mike@php.net>
Tue, 8 Jul 2014 10:14:04 +0000
(12:14 +0200)
php_http_client.c
patch
|
blob
|
history
diff --git
a/php_http_client.c
b/php_http_client.c
index 489177bf7a23fbcfdd347c875859ff79ba9b2afa..8a166fc23acb5d345064dd5c2e586879d63ea1f6 100644
(file)
--- a/
php_http_client.c
+++ b/
php_http_client.c
@@
-390,6
+390,9
@@
static STATUS handle_response(void *arg, php_http_client_t *client, php_http_cli
zval *info, *zresponse, *zrequest;
HashTable *info_ht;
+ /* ensure the message is of type response (could be uninitialized in case of early error, like DNS) */
+ php_http_message_set_type(msg, PHP_HTTP_RESPONSE);
+
if (z_is_true(zend_read_property(php_http_client_class_entry, &zclient, ZEND_STRL("recordHistory"), 0 TSRMLS_CC))) {
handle_history(&zclient, *request, *response TSRMLS_CC);
}