Skip to content

feat: Add RFC-compliant Date Header to Responses (RFC 7231 - Section 7.1.1.2)#10

Description

@Bernardusz

馃搩 Description

Per RFC 7231, a server must include a Date header in its responses. Levtus currently omits this, which can break client-side caching and protocol strictness.

馃搼 Requirements:

  • Create a utility to generate the current RFC 7231 timestamp in Response.java.
  • Update Response.writeHeaders() to automatically include the Date header in Response.java.
  • Add verification tests in RouterTest.

馃毄Constraint

Constraint: Use java.time (Java 8+) to format the date according to RFC 7231 - Section 7.1.1.2 (e.g., Tue, 15 Jul 2026 08:20:00 GMT).

馃専Target

Every HTTP request coming from Levtus server, should automatically include a Date header browser can use to cache data.

馃摎 References

RFC 7231 - Section 7.1.1.2

Metadata

Metadata

Assignees

Labels

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions