Skip to content

Cookie-Handling Problems #44

Description

@andreasdorfer

I encountered a problem working with cookies:
Calling an REST-auth-interface which relies on cookies, the data was not saved to the CURLOPT_COOKIEFILE.

CURL saves cookies when the handle is closed (see here: https://curl.haxx.se/docs/http-cookies.html). Obviously the method "sendRequest" in the Class "Curl" resets all options BEFORE the handle is closed. This way options like CURLOPT_COOKIEFILE, and CURLOPT_COOKIEJAR are ignored - nothing is saved.

Basically I think, after doing some testing and research I think it's not an good idea to use the same curl handle for different calls (with different options).

I would suggest to move the curl_init- and curl_close functions to the sendRequest-method, so that curl is initialised and closed properly at each request.

I am going to create an corresponding pull request.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions