Skip to content

Upstream 404 is not always passed through as 404 statusΒ #16

@martinemde

Description

@martinemde

Reported in slack:

% curl -I https://gem.coop/api/v1/gems/nonexistentpackage12345.json
HTTP/2 200 
content-type: text/plain
server: gem.coop
x-served-by: cache-ams2100103-AMS
date: Mon, 13 Oct 2025 11:32:01 GMT

Expected 404 status code but returns text in the body "404" with successful response.

Compare with rubygems.org:

% curl -I https://rubygems.org/api/v1/gems/nonexistentpackage12345.json
HTTP/2 404 
content-type: text/plain; charset=utf-8
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
cross-origin-opener-policy: same-origin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions