- add bool must_revalidate param to HttpResponse::setCacheControl()
[m6w6/ext-http] / http_request_object.c
index 93ce0109fa35f9f7dcfd62db3797ffa92c3968f2..ef8445c30c122f8c56e95af711b0ceaf6023007f 100644 (file)
@@ -1536,7 +1536,6 @@ PHP_METHOD(HttpRequest, getResponseCookies)
                                }
                        }
                        
-                       convert_to_array(*headers);
                        FOREACH_HASH_KEYVAL(pos1, Z_ARRVAL_PP(headers), key, idx, header) {
                                if (key && !strcasecmp(key, "Set-Cookie")) {
                                        http_cookie_list list;
@@ -1555,7 +1554,7 @@ PHP_METHOD(HttpRequest, getResponseCookies)
                                                                object_init(cookie);
                                                                http_cookie_list_tostruct(&list, cookie);
                                                                add_next_index_zval(return_value, cookie);
-                                                               zval_ptr_dtor(&cookie);
+                                                               http_cookie_list_dtor(&list);
                                                        }
                                                        zval_ptr_dtor(single_header);
                                                }
@@ -1569,7 +1568,7 @@ PHP_METHOD(HttpRequest, getResponseCookies)
                                                        object_init(cookie);
                                                        http_cookie_list_tostruct(&list, cookie);
                                                        add_next_index_zval(return_value, cookie);
-                                                       zval_ptr_dtor(&cookie);
+                                                       http_cookie_list_dtor(&list);
                                                }
                                                zval_ptr_dtor(header);
                                        }