mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
REST error responses normally go through RESTERR(), which sets Cache-Control: no-store. Some errors are returned directly by the generic HTTP dispatcher and bypass RESTERR(), including unmatched paths, queue exhaustion, handler exceptions, and shutdown rejection. Use a shared reply helper to set no-store on dispatcher-generated error responses. This avoids caching transient errors and keeps the behavior consistent across REST and RPC requests. Test the work-queue rejection path by checking that its HTTP 503 response includes the header.
34 KiB
Executable File
34 KiB
Executable File