Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie handling cannot be disabled since v3.2.1 #89

Closed
alex-schneider opened this issue Jul 10, 2019 · 5 comments
Closed

Cookie handling cannot be disabled since v3.2.1 #89

alex-schneider opened this issue Jul 10, 2019 · 5 comments

Comments

@alex-schneider
Copy link

The workaround for #84 enables cookies for the entire session and cannot be deactivated if connection-reuse is enabled.

Commit 301589d sets curl_easy_setopt(handler->handle, CURLOPT_COOKIEJAR, NULL)

According to https://curl.haxx.se/libcurl/c/CURLOPT_COOKIEJAR.html : Using this option also enables cookies for this session, so if you for example follow a location it will make matching cookies get sent accordingly.

We need to handle cookies ourselves, because we handle multiple concurrent sessions and want to use persistent connections for performance reasons.

@rcanavan
Copy link

This was broken before and has been fixed in #36.

@m6w6
Copy link
Owner

m6w6 commented Jul 10, 2019

We should probably limit that workaround to affected libcurl versions.

@m6w6
Copy link
Owner

m6w6 commented Jul 12, 2019

Can you provide a test case so this will not happen again?

The current test suite does not show any differences except avoiding the crashes with libcurl 7.63-7.64, even the new tests committed in 70b33df

@m6w6 m6w6 closed this as completed in 4e5f36b Jan 13, 2021
m6w6 added a commit that referenced this issue Jan 13, 2021
m6w6 added a commit that referenced this issue Jan 13, 2021
* Fixed configure on systems which do not provide icu-config
* Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1
m6w6 added a commit that referenced this issue Jan 13, 2021
* PHP 8 compatibility
	- Drop ext-propro support:
		PHP 8 removes the object get/set API from the ZendEngine, which renders
		that extension dysfunctional. As a consequence, the header property of
		http\Message and derived classes cannot be modified in place, and thus
		by reference.

Changes from beta1:
* Fixed configure on systems which do not provide icu-config
* Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1
m6w6 added a commit that referenced this issue Jan 13, 2021
* Fixed configure on systems which do not provide icu-config
* Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1
m6w6 added a commit that referenced this issue Jun 10, 2022
* Fix http\Client::requeue() not updating response callback
* Backport bug fixes and features from v4:
  * Fixed configure reliably finding the right libcurl features available
  * Fixed cookie handling with libcurl 7.77+ and consistently across all
    supported libcurl versions (follow-up to gh issue #116)
  * Fixed cookies failing with libcurl >= 7.77 (see gh issue #116)
  * Fixed tests using $_ENV instead of getenv() to find executables in PATH (see gh issue #113)
  * Fixed configure on systems which do not provide icu-config
  * Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1
  * Added http\Env::reset(): resets internal HTTP request cache (see gh issue #90)
  * Added request options:
    * http\Client\Curl::$abstract_unix_socket
    * http\Client\Curl::$altsvc
    * http\Client\Curl::$altsvc_ctrl
    * http\Client\Curl::$aws_sigv4
    * http\Client\Curl::$doh_url
    * http\Client\Curl::$dns_shuffle_addresses
    * http\Client\Curl::$haproxy_protocol
    * http\Client\Curl::$hsts
    * http\Client\Curl::$hsts_ctrl
    * http\Client\Curl::$http09_allowed
    * http\Client\Curl::$maxage_conn
    * http\Client\Curl::$pinned_publickey
    * http\Client\Curl::$proxy_ssl
    * http\Client\Curl::$socks5_auth
    * http\Client\Curl::$tcp_fastopen
    * http\Client\Curl::$tls13_ciphers
    * http\Client\Curl::$xoauth2_bearer
  * Added request option constants:
    * http\Client\Curl\AUTH_AWS_SIGV4
    * http\Client\Curl\AUTH_BEARER
    * http\Client\Curl\AUTH_NONE
    * http\Client\Curl\HTTP_VERSION_2_PRIOR_KNOWLEDGE
    * http\Client\Curl\HTTP_VERSION_3
    * http\Client\Curl\SSL_VERSION_MAX_*
    * http\Client\Curl\SSL_VERSION_TLSv1_3
  * Added library version constants:
    * http\Client\Curl\Versions\BROTLI
    * http\Client\Curl\Versions\CAINFO
    * http\Client\Curl\Versions\CAPATH
    * http\Client\Curl\Versions\HYPER
    * http\Client\Curl\Versions\ICONV
    * http\Client\Curl\Versions\NGHTTP2
    * http\Client\Curl\Versions\QUIC
    * http\Client\Curl\Versions\ZSTD
@afflerbach
Copy link

Two years later…

… I can confirm, that the issue is gone (at least in release 4.2.3). Thank you! 👍

@m6w6
Copy link
Owner

m6w6 commented Feb 1, 2023

"Thumbs up" is always good to hear and never too late! Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants