Expand description
The HTML page rws shows a browser for its own errors (18.37.0): 404, 502, 503, maintenance and the rest. One self-contained template (inline CSS, light and dark, a title, the status, one sentence, a link home) in the look of the directory listing.
API clients are unchanged: negotiated turns an
application/problem+json response into this page only when the
request’s Accept prefers text/html (a browser navigation). Under a
Content-Security-Policy that forbids inline styles the page still
reads, unstyled.
Functions§
- html
- The page for
status/reason;detailpicks the sentence ("maintenance") and is otherwise not shown (it may be technical). - maintenance_
message [maintenance] message(RWS_CONFIG_MAINTENANCE_MESSAGE), or the default.- maintenance_
retry_ after Retry-Afterseconds sent with maintenance responses (RWS_CONFIG_MAINTENANCE_RETRY_AFTER_SECS, default 120; 0 sends none).- negotiated
responseas the HTML page when it is an rws-made problem details response (application/problem+json) andrequestprefers HTML; otherwise unchanged.- wants_
html - Whether the request prefers HTML:
Acceptliststext/html(not withq=0) ahead of any JSON type.*/*alone (fetch, curl) is not HTML.