Mutare.Plug.Header (mutare_plug v0.1.0)

Copy Markdown View Source

:resp_header — removes explicit response-header mutations. A surviving mutant means no test depends on this code setting or deleting that response header.

put_resp_header(conn, "cache-control", "no-store")  # → conn
conn |> delete_resp_header("x-legacy")              # → conn |> Function.identity()
put_resp_content_type(conn, "application/json")     # → conn

Removing put_resp_content_type/2,3 leaves the response on the upstream (or default) content type, so a survivor means no test pins the response's content-type header — the charset-carrying arity 3 included.

Matches Plug.Conn.put_resp_header/3, Plug.Conn.delete_resp_header/2, and Plug.Conn.put_resp_content_type/2,3 written directly, aliased, or bare-imported. String values themselves are left to Mutare's built-in string mutators.