- 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 bc02315..d43d0fe 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 dc83d23..3fa73e2 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 93ce010..40b9dd3 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 c06e7ca..2a9d628 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);