HttpWebRequest/HttpWebResponse Cookie Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hyu1337@gmail.com

    HttpWebRequest/HttpWebResponse Cookie Problem

    I've being trying to get a cookie value for a certain site but the
    site I have no control over has a comma (",") in the cookie value
    and it gets broken down like this when I use the response=
    (HttpWebRequest )request.GetRes ponse.

    Name: SESSION_ID Value: 3862511
    Name:
    y90iM7ucrhW/nFEi8nxHdslJniT ZTOGlLgL0zEVrSi Flc8WKvP8Q3GIaa Nmz/XCZ
    Value: Path: /

    When the actual cookie should be
    Name: Session_ID
    Value =
    3862511,y90iM7u crhW/nFEi8nxHdslJniT ZTOGlLgL0zEVrSi Flc8WKvP8Q3GIaa Nmz
    /XCZ

    Is there a way to fix this? Or am I out of luck? Thanks.


    --
    --------------------------------- --- -- -
    Posted with NewsLeecher v3.9 Beta 2
    Web @ http://www.newsleecher.com/?usenet
    ------------------- ----- ---- -- -

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: HttpWebRequest/HttpWebResponse Cookie Problem

    .NET is processing this correctly and unfortunately the website is wrong
    in sending this value. The standard says that commas should not be used in
    cookie values (along with semi-colons, and spaces, I believe).

    You will have to take the two values for the SESSION_ID cookie and
    append the comma into it.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m


    "L33TNoobie " <hyu1337@gmail. comwrote in message
    news:4654408e$0 $19384$4c368faf @roadrunner.com ...
    I've being trying to get a cookie value for a certain site but the
    site I have no control over has a comma (",") in the cookie value
    and it gets broken down like this when I use the response=
    (HttpWebRequest )request.GetRes ponse.
    >
    Name: SESSION_ID Value: 3862511
    Name:
    y90iM7ucrhW/nFEi8nxHdslJniT ZTOGlLgL0zEVrSi Flc8WKvP8Q3GIaa Nmz/XCZ
    Value: Path: /
    >
    When the actual cookie should be
    Name: Session_ID
    Value =
    3862511,y90iM7u crhW/nFEi8nxHdslJniT ZTOGlLgL0zEVrSi Flc8WKvP8Q3GIaa Nmz
    /XCZ
    >
    Is there a way to fix this? Or am I out of luck? Thanks.
    >
    >
    --
    --------------------------------- --- -- -
    Posted with NewsLeecher v3.9 Beta 2
    Web @ http://www.newsleecher.com/?usenet
    ------------------- ----- ---- -- -
    >

    Comment

    Working...