File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ let httpError = require('./errors')
2
2
let binaryTypes = require ( './helpers/binary-types' )
3
3
let { brotliCompressSync } = require ( 'zlib' )
4
4
5
- let binaryTypesSet = new Set ( binaryTypes )
6
-
7
5
module . exports = function responseFormatter ( req , params ) {
8
6
let isError = params instanceof Error
9
7
@@ -170,7 +168,7 @@ module.exports = function responseFormatter (req, params) {
170
168
171
169
// Handle body encoding (if necessary)
172
170
let [ cTest ] = ( res . headers [ 'content-type' ] || '' ) . split ( ';' )
173
- let isBinary = binaryTypesSet . has ( cTest )
171
+ let isBinary = binaryTypes . includes ( cTest )
174
172
let bodyIsString = typeof res . body === 'string'
175
173
let b64enc = i => new Buffer . from ( i ) . toString ( 'base64' )
176
174
function compress ( body ) {
You can’t perform that action at this time.
0 commit comments