diff --git a/src/helper/streaming/text.test.ts b/src/helper/streaming/text.test.ts index 9458a095..d4301506 100644 --- a/src/helper/streaming/text.test.ts +++ b/src/helper/streaming/text.test.ts @@ -20,6 +20,7 @@ describe('Text Streaming Helper', () => { expect(res.headers.get('content-type')).toMatch(/^text\/plain/) expect(res.headers.get('x-content-type-options')).toBe('nosniff') expect(res.headers.get('transfer-encoding')).toBe('chunked') + expect(res.headers.get('content-encoding')).toBe('identity') if (!res.body) { throw new Error('Body is null') diff --git a/src/helper/streaming/text.ts b/src/helper/streaming/text.ts index fe707cc6..0a573a39 100644 --- a/src/helper/streaming/text.ts +++ b/src/helper/streaming/text.ts @@ -11,5 +11,6 @@ export const streamText = ( c.header('Content-Type', TEXT_PLAIN) c.header('X-Content-Type-Options', 'nosniff') c.header('Transfer-Encoding', 'chunked') + c.header('Content-Encoding', 'identity') return stream(c, cb, onError) }