Skip to content

Conversation

@artemredkin
Copy link
Collaborator

Adds rfc2616#section-3.3.1 date format parsing.

Motivation:
The https://tools.ietf.org/html/rfc2616#section-3.3.1 specifies the Sunday, 06-Nov-94 08:49:37 GMT as a valid date format. We need to support that.

Modifications:
Updated cookie parsing to support additional date format.

Result:
Closes #314

@artemredkin artemredkin added this to the 1.2.2 milestone Nov 11, 2020
@artemredkin artemredkin requested a review from Lukasa November 11, 2020 11:39
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC 2616 was obsoleted a while back. The relevant citation is now RFC 7231 § 7.1.1.1, and that provides us a normative MUST:

A recipient that parses a timestamp value in an HTTP header field
MUST accept all three HTTP-date formats.

We are currently only accepting two: we should update this patch to tolerate all three.

@artemredkin artemredkin force-pushed the update_expires_date_parsing branch from 7dbc774 to 011d744 Compare November 11, 2020 12:30
@artemredkin
Copy link
Collaborator Author

Good catch, fixed!

@artemredkin artemredkin requested a review from Lukasa November 11, 2020 12:42
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Lukasa Lukasa merged commit 1bc2e1a into swift-server:main Nov 11, 2020
@artemredkin artemredkin deleted the update_expires_date_parsing branch November 11, 2020 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants