File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -180,13 +180,10 @@ function areConditionalHeadersPresent(
180
180
181
181
const { conditionalHeaders } = options ;
182
182
183
- // Only check for if-none-match and if- unmodified-since because the docs said
183
+ // Only check for if-unmodified-since because the docs said
184
184
// so, also what nginx does from my experiments
185
185
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412
186
- return (
187
- conditionalHeaders . ifNoneMatch !== undefined ||
188
- conditionalHeaders . ifUnmodifiedSince !== undefined
189
- ) ;
186
+ return conditionalHeaders . ifUnmodifiedSince !== undefined ;
190
187
}
191
188
192
189
function determineHttpStatusCode (
@@ -208,7 +205,7 @@ function determineHttpStatusCode(
208
205
return 412 ;
209
206
}
210
207
211
- // We weren't given a body and preconditions succeeded.
208
+ // We weren't given a body
212
209
return 304 ;
213
210
}
214
211
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ describe('File Tests', () => {
160
160
'if-none-match' : originalETag ,
161
161
} ,
162
162
} ) ;
163
- assert ( res . status === 304 || res . status === 412 ) ;
163
+ assert ( res . status === 304 ) ;
164
164
} ) ;
165
165
166
166
it ( 'handles range header correctly' , async ( ) => {
You can’t perform that action at this time.
0 commit comments