Skip to content

Commit b22f9e5

Browse files
committed
ensure protocol consistency by adding an empty response body on hit
1 parent 782cb3d commit b22f9e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function idempotencyMiddleware({
6969
res.statusCode = 204
7070
res.setHeader('X-Idempotency-Status', 'hit')
7171
res.setHeader('Content-Type', 'text/plain; charset=utf-8')
72-
res.end()
72+
res.end('') // Ensuring protocol consistency
7373
} else {
7474
// No cached response found: set up a post-response hook
7575
onEnd(res, function (payload) {

0 commit comments

Comments
 (0)