aspnet / HttpAbstractions

[Archived] HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities. Project moved to https://github.com/aspnet/AspNetCore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetSetCookieLength method is not parsing correctly when cookie has invalid keyvalue pair

dhmuralikrishna opened this issue · comments

commented

Lets say set-cookie value is
cookiename=cookievalue; Version=1; Domain=.contoso.com; Path=/; Secure; HttpOnly";

Then it's not parsing to SetcookieHeaderValue in SetcookieHeaderValue.TryParse is returning null.

Version =1 might not be valid as per the spec. But other non-windows servers are sending the cookie like that.

Expected Ignore Version =1 and fill remaining values in SetCookieHeaderValue.

Where are you getting cookies like this from?

commented

From one of the dependent systems.

What kind of server / software is creating a cookie with that format?

commented

I think its java app don't know much details. we are consuming https endpoint int he response set-cookie it has version=1