Open the context
Choose the project folder and name the files or behavior involved.
Return 304 for a matching validator on a GET request and send changed content normally. Check a missing header, a weak validator and a 304 response with no body using the project’s HTTP parser.
Choose the project folder and name the files or behavior involved.
Describe the input, expected output and boundaries that must stay intact.
Review the proposed edits and any commands before relying on their result.
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
const unchanged = request.method === "GET" &&
validatorMatches(request.headers.get("if-none-match"), etag);
return new Response(unchanged ? null : body, {
status: unchanged ? 304 : 200,
headers: { ETag: etag },
});The example is a starting point for a real project, not a claim that generated code is already tested. Adjust paths, dependencies and expected behavior to match your application.