Skip to content

Commit

Permalink
fix: return proper status code when if-modified or if-none-match prec…
Browse files Browse the repository at this point in the history
…onditions fail

Resolves #16
  • Loading branch information
flakey5 committed Sep 27, 2023
1 parent cb86094 commit 290c1b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/handlers/helpers/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ function getStatusCode(request: Request, objectHasBody: boolean): number {
}

if (
request.headers.has('if-modified') ||
request.headers.has('if-unmodified-since') ||
request.headers.has('if-match') ||
request.headers.has('if-none-match')
request.headers.has('if-unmodified-since')
) {
// No body due to precondition failure
return 412;
Expand Down

0 comments on commit 290c1b8

Please sign in to comment.