File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ class CacheRevalidationHandler extends DecoratorHandler {
60
60
// https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-a-validation-respo
61
61
if ( statusCode === 304 ) {
62
62
this . #successful = true
63
- this . #successCallback( )
64
63
return true
65
64
}
66
65
@@ -72,7 +71,8 @@ class CacheRevalidationHandler extends DecoratorHandler {
72
71
statusMessage
73
72
)
74
73
}
75
- return false
74
+
75
+ return true
76
76
}
77
77
78
78
/**
@@ -90,7 +90,7 @@ class CacheRevalidationHandler extends DecoratorHandler {
90
90
return this . #handler. onData ( chunk )
91
91
}
92
92
93
- return false
93
+ return true
94
94
}
95
95
96
96
/**
@@ -99,7 +99,9 @@ class CacheRevalidationHandler extends DecoratorHandler {
99
99
* @param {string[] | null } rawTrailers
100
100
*/
101
101
onComplete ( rawTrailers ) {
102
- if ( ! this . #successful && typeof this . #handler. onComplete === 'function' ) {
102
+ if ( this . #successful) {
103
+ this . #successCallback( )
104
+ } else if ( typeof this . #handler. onComplete === 'function' ) {
103
105
this . #handler. onComplete ( rawTrailers )
104
106
}
105
107
}
You can’t perform that action at this time.
0 commit comments