Revert "add more cookie tests"
authorMichael Wallner <mike@php.net>
Fri, 12 Jul 2019 12:26:11 +0000 (14:26 +0200)
committerMichael Wallner <mike@php.net>
Fri, 12 Jul 2019 12:26:11 +0000 (14:26 +0200)
This reverts commit e2b947ae9fa3b56f94855c5c111ccc9fb595d460.

BUGS
src/php_http_client_curl.c
tests/client031.phpt [deleted file]
tests/client032.phpt [deleted file]

diff --git a/BUGS b/BUGS
index 62a1511f06fb2afdb95471601bbfadeb9b9d24f7..4c2ad80b6025a49554ce2b2c54e6b02063385c26 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1,6 +1,25 @@
 Known Issues
 ============
 
-## libcurl-7.64.1
+Windows:
+       If you keep getting "SSL connect error" when trying to issue 
+               requests, try another (newer) libeay32.dll/ssleay32.dll pair.
 
-Superfluous output of "* Closing connection #" on STDERR.
\ No newline at end of file
+Internals:
+       Inflating raw deflated data causes a re-initialization of the inflate
+               stream where the corresponding window bits are modified to tell libz
+               to not check for zlib header bytes.  This is not preventable AFAICS.
+       LFS dependant parts of libcurl are left out because of off_t,
+               respectively off64_t confusion.
+       Persistent handles and "cookiestore" request option do interfere,
+               as libcurl saves the cookies to the file on curl_easy_destroy(),
+               cookies are not saved until the CURL handle will be recycled.
+                       Thus one would either need to
+                               * run PHP with raphf.persistent_handles.limit = 0
+                               * call raphf\persistent_handles_clean() every request
+                               * call $client->flushCookies(), which is available
+                                 since libcurl v7.17.1 and does not work with the
+                                 procedural API
+       HTTP and Proxy authentication information (username/password) can not be
+               unset with NULL prior libcurl v7.19.6 and separate options for setting
+               username and password--which work--are only available since v7.19.6.
index 389464bad77f4fc77c17016892c6bd8848740f6b..45515fa2686316497d184982fe76d95521eca955 100644 (file)
@@ -2075,9 +2075,7 @@ static void php_http_client_curl_handler_clear(php_http_client_curl_handler_t *h
        curl_easy_setopt(handler->handle, CURLOPT_COOKIELIST, "FLUSH");
        curl_easy_setopt(handler->handle, CURLOPT_SHARE, NULL);
        /* see gh issue #84 */
-       //if (php_http_curle_get_storage(handler->handle)->cookiestore) {
-               //curl_easy_setopt(handler->handle, CURLOPT_COOKIEJAR, NULL);
-       //}
+       curl_easy_setopt(handler->handle, CURLOPT_COOKIEJAR, NULL);
 }
 
 static void php_http_client_curl_handler_dtor(php_http_client_curl_handler_t *handler)
diff --git a/tests/client031.phpt b/tests/client031.phpt
deleted file mode 100644 (file)
index 3211735..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
---TEST--
-client cookie sharing disabled
---SKIPIF--
-<?php
-include "skipif.inc";
-skip_client_test();
-?>
---FILE--
-<?php
-
-include "helper/server.inc";
-include "helper/dump.inc";
-
-echo "Test\n";
-
-server("cookie.inc", function($port) {
-       $client = new http\Client(null, "cookies");
-       $client->configure(array("share_cookies" => false));
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-       /* requeue the previous request */
-       $client->requeue($request);
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-});
-
-?>
-===DONE===
---EXPECTF--
-Test
-Etag: ""
-Set-Cookie: counter=1;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=1;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=2;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=1;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=1;
-X-Original-Transfer-Encoding: chunked
-
-===DONE===
diff --git a/tests/client032.phpt b/tests/client032.phpt
deleted file mode 100644 (file)
index d8dfb2b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
---TEST--
-client cookie sharing enabled
---SKIPIF--
-<?php
-include "skipif.inc";
-skip_client_test();
-?>
---FILE--
-<?php
-
-include "helper/server.inc";
-include "helper/dump.inc";
-
-echo "Test\n";
-
-server("cookie.inc", function($port) {
-       $client = new http\Client(null, "cookies");
-       $client->configure(array("share_cookies" => true));
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-       /* requeue the previous request */
-       $client->requeue($request);
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-       $request = new http\Client\Request("GET", "http://localhost:$port");
-       $client->enqueue($request);
-       $client->send();
-       while (($r = $client->getResponse())) {
-               dump_headers(null, $r->getHeaders());
-       }
-});
-
-?>
-===DONE===
---EXPECTF--
-Test
-Etag: ""
-Set-Cookie: counter=1;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=2;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=2;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=3;
-X-Original-Transfer-Encoding: chunked
-
-Etag: ""
-Set-Cookie: counter=4;
-X-Original-Transfer-Encoding: chunked
-
-===DONE===