INNER CODE UNIT · JavaScript

contentstream

expressjs/body-parser · lib/read.js:189

function contentstream (req, debug, inflate) {
  const encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
  const length = req.headers['content-length']

  debug('content-encoding "%s"', encoding)

  if (inflate === false && encoding !== 'identity') {
    throw createError(415, 'content encoding unsupported', {
      encoding,
      type: 'encoding.unsupported'
    })
  }

  if (encoding === 'identity') {
    req.length = length
    return req
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…