[Archived] HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
382
stars
194
forks
source link
Add support for HttpCookie expires date format #1053
The format generated by System.Web.HttpCookie when formated is non-standard, a mix between RFC1123 and RFC850 (At least as of .NET Framework 4.6.1)
The exact format string used is "ddd, dd-MMM-yyyy HH':'mm':'ss 'GMT'" as seen here
This doesn't quite match RFC1123 which is "ddd, d MMM yyyy H:m:s 'GMT'" as it uses dashes between the day, month, and year instead of spaces, but doesn't quite match RFC850 which is "dddd, d'-'MMM'-'yy H:m:s 'GMT'" as it uses a short day of the week instead of a longer form.
This change allows the SetCookieHeaderValue to properly parse a response from the an API using the older System.Web.HttpCookie class to generate a HTTP response.
The format generated by System.Web.HttpCookie when formated is non-standard, a mix between RFC1123 and RFC850 (At least as of .NET Framework 4.6.1)
The exact format string used is
"ddd, dd-MMM-yyyy HH':'mm':'ss 'GMT'"
as seen hereThis doesn't quite match RFC1123 which is
"ddd, d MMM yyyy H:m:s 'GMT'"
as it uses dashes between the day, month, and year instead of spaces, but doesn't quite match RFC850 which is"dddd, d'-'MMM'-'yy H:m:s 'GMT'"
as it uses a short day of the week instead of a longer form.This change allows the SetCookieHeaderValue to properly parse a response from the an API using the older System.Web.HttpCookie class to generate a HTTP response.