[Mono-bugs] [Bug 670189] New: (2.8.2) System.Net.HttpWebResponse.SetCookie() causes NullReferenceException on empty cookie input

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 8 02:45:56 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=670189

https://bugzilla.novell.com/show_bug.cgi?id=670189#c0


           Summary: (2.8.2) System.Net.HttpWebResponse.SetCookie() causes
                    NullReferenceException on empty cookie input
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: phillip.sitbon+novell at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: No


Description of Problem:

When called from FillCookies(), SetCookie() can be called with an empty header
string, in which case line 427:

> if (cookie.Domain == "")
>         cookie.Domain = uri.Host;

causes a NullReferenceException.

Steps to reproduce the problem:
1. Create a HttpWebRequest object and perform a request with a non-empty
CookieContainer.
2. Make sure the requested page returns an empty Set-Cookie header.


Additional Information:

I've experienced empty Set-Cookie headers from a few websites now. It's that
it's easy to cause a Rails app to do this.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list