I’m using HttpWebRequest to download data from the website, and I noticed a bug related to the cookies.
When you get the data from domain.com, and that website redirects to http://www.domain.com, which sends a cookie, that cookie isn’t shared with domain.com. This causes some nasty bugs in my app.
I know that http://www.domain.com is not necessary the same website as domain.com, but I believe that in this case the benefits will outweigh any associated risks.
Is there any easy way to automatically apply cookies from domain.com to http://www.domain.com and vice verse?
Here’s what I did: