We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25d431b commit ab42afcCopy full SHA for ab42afc
lib/handler/retry-handler.js
@@ -281,7 +281,11 @@ class RetryHandler {
281
// Weak etags are not useful for comparison nor cache
282
// for instance not safe to assume if the response is byte-per-byte
283
// equal
284
- if (this.etag != null && this.etag.startsWith('W/')) {
+ if (
285
+ this.etag != null &&
286
+ this.etag[0] === 'W' &&
287
+ this.etag[1] === '/'
288
+ ) {
289
this.etag = null
290
}
291
@@ -339,6 +343,11 @@ class RetryHandler {
339
343
onRetry.bind(this)
340
344
)
341
345
346
+ /**
347
+ * @this {RetryHandler}
348
+ * @param {Error} [err]
349
+ * @returns
350
+ */
342
351
function onRetry (err) {
352
if (err != null || this.aborted || isDisturbed(this.opts.body)) {
353
return this.handler.onError(err)
0 commit comments