- if (response && request) {
- zval *hist, *history = GET_PROP(history);
- http_message *hist_msg = http_message_reverse(http_message_interconnect(response, request));
-
- MAKE_STD_ZVAL(hist);
- ZVAL_OBJVAL(hist, http_message_object_new_ex(http_message_object_ce, hist_msg, NULL), 0);
- if (Z_TYPE_P(history) == IS_OBJECT) {
- http_message_object_prepend(hist, history);
- }
- SET_PROP(history, hist);
- zval_ptr_dtor(&hist);
- } else {
- http_message_free(&response);
- http_message_free(&request);
+ MAKE_STD_ZVAL(hist);
+ ZVAL_OBJVAL(hist, http_message_object_new_ex(http_message_object_ce, http_message_interconnect(response, request), NULL), 0);
+ if (Z_TYPE_P(history) == IS_OBJECT) {
+ http_message_object_prepend(hist, history);