Home Dashboard Directory Help
Search

CookieContainer subdomain handling issue in .NET 4.0 by i1yich


Status: 

Active


22
0
Sign in
to vote
Type: Bug
ID: 771651
Opened: 11/19/2012 2:08:55 PM
Access Restriction: Public
1
Workaround(s)
view
5
User(s) can reproduce this bug

Description

After fixing famous bug in CookieContainer about leading dot in hostname (FeedbackID=478521, also described in http://dot-net-expertise.blogspot.ru/2009/10/cookiecontainer-domain-handling-bug-fix.html), there is a new bug, that came to replace old one.

Now, when you're setting RFC2109-cookie (Version=1) for parent domain ".site.com", you cannot get it back for subdomain "www.site.com".

See attached project for more tests reproducing the problem.
Details
Sign in to post a comment.
Posted by Sunday Ironfoot on 2/20/2014 at 7:24 AM
"Regrettfully, we are unable to take this bug at this time"

Any reason why? This bug is really affecting us.
Posted by Microsoft on 4/5/2013 at 3:20 PM
Regrettfully, we are unable to take this bug at this time
Posted by Microsoft on 11/19/2012 at 10:10 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been reproduced and has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 11/19/2012 at 2:52 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by i1yich on 11/19/2012 at 2:23 PM
Workaround #1: after receiving response with Version=1 cookies, add them to new CookieContainer as plain cookies, and then use this new container to make subsequent requests.

Workaround #2: after receiving response with Version=1 cookies for parent domain, add them to same CookieContainer once again, now for subdomain.

All these workarounds are very inconvenient when request is automatically redirected, so you cannot insert this additional cookie processing between original request and redirected one.
File Name Submitted By Submitted On File Size  
TestCookies.zip 11/19/2012 43 KB