Opened 13 months ago

Last modified 6 months ago

#32065 new defect

Cache-Control header on 404 does not permit caching

Reported by: irl Owned by: metrics-team
Priority: Medium Milestone:
Component: Metrics/Onionoo Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Discovered when deploying a new frontend host.

Child Tickets

Change History (4)

comment:1 Changed 13 months ago by karsten

Is this issue related to or even a duplicate of #22062?

comment:2 Changed 12 months ago by irl

I think it's not a duplicate, but it is related. #22062 seems to be about 5xx errors where this is about 404. They are likely handled differently in the codebase.

comment:3 Changed 8 months ago by karsten

Status: newneeds_review

How about we solve this by adding an ErrorServlet that handles all requests that Jetty cannot hand over to our main ResourceServlet? More generally, that servlet could respond to most non-200 requests. It would be an alternative to the Jetty-generated error page and could be in a custom-defined JSON format rather than in HTML. As a side effect it would allow us to include error messages (like a request was found bad) that could be processed by the client and displayed to the user. This would give us more control over response headers. Setting to needs_review to discuss the idea.

comment:4 Changed 6 months ago by karsten

Status: needs_reviewnew

irl and I just talked about this change and found it a good way forward. There's still code to write which I'll do, so changing status back to new.

Note: See TracTickets for help on using tickets.