From: Michael Wallner Date: Fri, 12 Jul 2019 12:26:11 +0000 (+0200) Subject: Revert "add more cookie tests" X-Git-Tag: RELEASE_3_2_2~13 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=cb52f6733c36f10ba469fd26464f44fa4c79f29e Revert "add more cookie tests" This reverts commit e2b947ae9fa3b56f94855c5c111ccc9fb595d460. --- diff --git a/BUGS b/BUGS index 62a1511..4c2ad80 100644 --- 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. diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 389464b..45515fa 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -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 index 3211735..0000000 --- a/tests/client031.phpt +++ /dev/null @@ -1,71 +0,0 @@ ---TEST-- -client cookie sharing disabled ---SKIPIF-- - ---FILE-- -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 index d8dfb2b..0000000 --- a/tests/client032.phpt +++ /dev/null @@ -1,71 +0,0 @@ ---TEST-- -client cookie sharing enabled ---SKIPIF-- - ---FILE-- -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===