Skip to content

HttpHeaderParser - relaxed timestamp parsing #6289

@jerrinot

Description

@jerrinot

Is your feature request related to a problem?

I saw this in the wild: invalid cookie Expires value [value=Mon, 20-Oct-25 15:57:56 GMT]

Apparently, this 2-digit year format is an HTTP 1.0-era format. Technically, it should not be used anymore, but apparently some system still uses it. Our cookie handler should be able to parse this format.

Describe the solution you'd like.

Add a new pattern to

final String[] httpPatterns = new String[]{ // priority sorted
"E, d MMM yyyy HH:mm:ss Z", // HTTP standard
"E, d-MMM-yyyy HH:mm:ss Z" // Microsoft EntraID
};
and write tests

Describe alternatives you've considered.

No response

Full Name:

Jaromir Hamala

Affiliation:

QuestDB

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions