AngleSharp.Io icon indicating copy to clipboard operation
AngleSharp.Io copied to clipboard

Doesn't handle cookies where the Domain starts with a dot.

Open TonyDev314 opened this issue 4 months ago • 7 comments

The AdvancedCookieProvider does not cater for cookies lacking the "www" on the front.

The website I am working with has cookies with the "www.websitename.com" domain and cookies with the ".websitename.com" domain.

On adding the cookies the code currently strips off the "." and when selecting cookies to send on the next request, ignores all these cookies because they don't match the host name.

Should the code be altering the Domain name of cookies??

I think it needs to leave the Domain alone when set, and do a comparison on the basis of the host and the cookie domain excluding a leading "www." or "."

TonyDev314 avatar Feb 28 '24 23:02 TonyDev314