Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC822 time parser does not handle single digit day #1009

Open
tjdett opened this issue Nov 4, 2024 · 0 comments
Open

RFC822 time parser does not handle single digit day #1009

tjdett opened this issue Nov 4, 2024 · 0 comments

Comments

@tjdett
Copy link

tjdett commented Nov 4, 2024

Failed reading: Failure parsing Time from value: "Mon, 4 Nov 2024 06:48:27 GMT"

While references like MDN refer to <day> as being two digit, it is actually defined as 1*2DIGIT in both the original RFC822 and in the more recent RFC5322.

According to RFC1945, this means it can be validly be either one or two digits:

*rule
       The character "*" preceding an element indicates repetition. The
       full form is "<n>*<m>element" indicating at least <n> and at
       most <m> occurrences of element. Default values are 0 and
       infinity so that "*(element)" allows any number, including zero;
       "1*element" requires at least one; and "1*2element" allows one
       or two.

This was discovered when testing functionality using Amazonka 2.x against the rclone serve s3 server.

@tjdett tjdett changed the title RFC822 time parser does not handle single digit date RFC822 time parser does not handle single digit day Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant