- fix HttpRequest::getResponseCookies()
authorMichael Wallner <mike@php.net>
Mon, 13 Feb 2006 21:42:16 +0000 (21:42 +0000)
committerMichael Wallner <mike@php.net>
Mon, 13 Feb 2006 21:42:16 +0000 (21:42 +0000)
http_cookie_api.c
http_request_api.c
http_request_object.c
php_http_cookie_api.h

index bc02315e6f9098880f3a6f416d0d4c0487c66222..d43d0fe86850c58ca9a16368d37f851ba61519b5 100644 (file)
@@ -26,10 +26,10 @@ PHP_MINIT_FUNCTION(http_cookie)
        return SUCCESS;
 }
 
-PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list TSRMLS_DC)
+PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC)
 {
        if (!list) {
-               list = emalloc(sizeof(http_cookie_list));
+               list = emalloc_rel(sizeof(http_cookie_list));
        }
        
        zend_hash_init(&list->cookies, 0, NULL, ZVAL_PTR_DTOR, 0);
index dc83d236fa83e38fcf7c9786673c7bb3367a024b..3fa73e217e6c6ebe9d651ab3ee3eded5981399a1 100644 (file)
@@ -871,7 +871,7 @@ PHP_HTTP_API void _http_request_info(http_request *request, HashTable *info)
        HTTP_CURL_INFO(CURLINFO_CONTENT_TYPE);
        HTTP_CURL_INFO(CURLINFO_HTTPAUTH_AVAIL);
        HTTP_CURL_INFO(CURLINFO_PROXYAUTH_AVAIL);
-       /*HTTP_CURL_INFO(OS_ERRNO);*/
+       HTTP_CURL_INFO(CURLINFO_OS_ERRNO);
        HTTP_CURL_INFO(CURLINFO_NUM_CONNECTS);
 #if LIBCURL_VERSION_NUM >= 0x070e01
        HTTP_CURL_INFO_EX(CURLINFO_COOKIELIST, "cookies");
index 93ce0109fa35f9f7dcfd62db3797ffa92c3968f2..40b9dd3451bb6cb6366674cbc300c0e7f7670ab6 100644 (file)
@@ -1555,7 +1555,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 +1569,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);
                                        }
index c06e7ca897715d7f3c51ec30339eb8e939f99aca..2a9d628e31a6d5b50d00c5e1999499ef6425494a 100644 (file)
@@ -36,9 +36,9 @@ typedef struct {
        time_t expires;
 } http_cookie_list;
 
-#define http_cookie_list_new() _http_cookie_list_init(NULL TSRMLS_CC)
-#define http_cookie_list_init(l) _http_cookie_list_init((l) TSRMLS_CC)
-PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list TSRMLS_DC);
+#define http_cookie_list_new() _http_cookie_list_init(NULL ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC)
+#define http_cookie_list_init(l) _http_cookie_list_init((l) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC)
+PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC);
 
 #define http_cookie_list_dtor(l) _http_cookie_list_dtor((l) TSRMLS_CC)
 PHP_HTTP_API void _http_cookie_list_dtor(http_cookie_list *list TSRMLS_DC);