Skip to main content

not_found_headers

Function not_found_headers 

Source
pub fn not_found_headers(
    path: &str,
    conneg_enabled: bool,
) -> Vec<(&'static str, String)>
Expand description

Build the header set returned on 404 Not Found for an LDP path.

JSS emits a rich discovery header set on 404 so that clients can drive a PUT-to-create or POST-to-container flow without a second OPTIONS round trip:

  • Allow — methods the server will accept on this path. DELETE is intentionally omitted because the resource does not exist.
  • Accept-Put: */* — PUT accepts any content type (spec default).
  • Link: <path.acl>; rel="acl" — ACL discovery.
  • Vary — includes Accept when content negotiation is enabled so caches key on it.
  • Accept-Post — only for containers; advertises the RDF formats usable as POST bodies.