Answer 499 to an image request whose client went away (closes #339)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
When the client of an image request goes away before its image is ready, the image proxy returns context.Canceled. serveImage now logs this once at info level, with the request_id, host and path, and answers 499, the status nginx calls "client closed request". It was answered 500 and logged at error level, as pixa's own failure. The check sits in serveImage, before respondImageError, which cannot see the request's context. A cancellation while the request's context is live is still answered 500. README.md lists the 499 on both image routes. Model: opus-5-5
This commit is contained in:
@@ -30,6 +30,16 @@ P2: security: per-origin rate limiting
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-26 on both image routes, a request whose client went away before its
|
||||
image was ready is answered 499 and logged at info level (closes #339). It was
|
||||
answered 500 and logged at error level, as pixa's own failure.
|
||||
- The line is "client went away before the image was ready". It carries the
|
||||
`request_id`, the host and the path.
|
||||
- The 499 has no body, since nobody reads it.
|
||||
- `serveImage` answers it before calling `respondImageError`, which cannot
|
||||
see the request's context.
|
||||
- An error wrapping `context.Canceled` while the request's context is live
|
||||
is still answered 500 and logged at error level.
|
||||
- 2026-10-26 `README.md`'s Design section starts with a Concepts list (closes
|
||||
#321). Each concept gets one sentence, under the name the code gives it.
|
||||
- Storage calls the transformed images variants, in shorter sentences.
|
||||
|
||||
Reference in New Issue
Block a user