if (type != message->type) {
/* free request info */
- switch (message->type = type) {
+ switch (message->type) {
case PHP_HTTP_REQUEST:
STR_FREE(message->http.info.request.method);
STR_FREE(message->http.info.request.url);
break;
}
+ message->type = type;
memset(&message->http, 0, sizeof(message->http));
}
}
temp->parent = php_http_message_init(NULL, 0 TSRMLS_CC);
php_http_message_set_info(temp->parent, &info);
zend_hash_copy(&temp->parent->hdrs, &from->parent->hdrs, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
- php_http_message_body_copy(&from->body, &temp->body, 1);
+ php_http_message_body_copy(&from->parent->body, &temp->parent->body, 1);
temp = temp->parent;
from = from->parent;