Skip to content

RFC822 time parser does not handle single digit day #1009

Open
@tjdett

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions