Skip to content

CURLOPT_COOKIEFILE and Easy::cookie_file #636

Description

@jcamiel

Hello all,

The libcurl doc for CURLOPT_COOKIEFILE states that:

Setting this option to NULL disables the cookie engine and clears the list of files to read cookies from.

I've a use case where an Easy handle configures a certain cookie file, and then should be set to null for subsequent request (reusing the same handle).

The actual signature of the Easy cookie file method is:

pub fn cookie_file<P: AsRef<Path>>(&mut self, file: P) -> Result<(), Error> {

Would the curl crate project accepts a PR that changes the signature to pass a NULL to CURLOPT_COOKIEFILE (changing the P parameter to Option<P>):

pub fn cookie_file<P: AsRef<Path>>(&mut self, file: Option<P>) -> Result<(), Error> {

The same kind of signature that other methods have:

pub fn unix_socket_path<P: AsRef<Path>>(&mut self, path: Option<P>) -> Result<(), Error> {

I'm asking this question because I've the impression (certainly not real and not a critique at all) that the crate is now only accepting updates to the libcurl binding PR kind.

Thanks a lot for any feedback,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions