> -----Ursprüngliche Nachricht-----

> Von: Daniel Stenberg <dan...@haxx.se<mailto:dan...@haxx.se>>

> Gesendet: Dienstag, 24. September 2019 17:28

> An: Hölzl, Dominik 
> <dominik.hoe...@fabasoft.com<mailto:dominik.hoe...@fabasoft.com>>

> Betreff: Re: AW: Get cookies for specific URL

>

> On Tue, 24 Sep 2019, Hölzl, Dominik wrote:

>

> > Thank you!

>

> Please don't take discussions off-list.



Sorry for that, I just hit the answere button in my mail client, and I don't 
use mailing lists that often.



>

> > What I would need is passing an URL and that HTTPOnly-cookies should

> > be retrieved and getting the appropriate cookie names and values

> > (Mainly what InternetGetCookieEx does).

>

> I have exactly zero ideas what InternetGetCookieEx does! =)

>

> > For now I will go with external matching, as you say the missing

> > domain isn't an issue for what I need it.  It would only be nice to

> > have an API as the code is already there but cannot be used now in

> > that

> way.

>

> Well, if you who have a use case, can easily work around it and not

> work on a API then perhaps the need isn't that big...

>

> --

>

>   / daniel.haxx.se



With InternetGetCookieEx you can specify an URL and a cookie name and a flag if 
it should also return HTTPOnly cookies, and it will return the appropriate 
cookie value from the cookie store as it would be sent to the specified URL 
when a request would be issued.



When I peform a request with cURL and the server responds with a Set-Cookie 
instruction, the cookie will be put into the CURLSH's cookie store. And after 
this I would like to read a specific cookie matching the respective URL (and 
path).



With the currently available API I could either catch the Set-Cookie headers, 
or use CURLINFO_COOKIELIST and check if the cookies matches the given URL, 
path, etc. (removeexpired, tailmatch, pathmatch, ..).



For security and maintenance reasons it just would be nice to have one single 
code for that.



Regards,

Dominik





-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to