Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@middy/http-multipart-body-parser

Package Overview
Dependencies
Maintainers
3
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/http-multipart-body-parser - npm Package Compare versions

Comparing version 4.0.10 to 4.1.0

1

index.d.ts

@@ -23,2 +23,3 @@ import middy from '@middy/core'

charset?: string
disableContentTypeError?: boolean
}

@@ -25,0 +26,0 @@

14

index.js

@@ -7,3 +7,4 @@ import BusBoy from 'busboy';

busboy: {},
charset: 'utf8'
charset: 'utf8',
disableContentTypeError: true
};

@@ -18,7 +19,14 @@ const httpMultipartBodyParserMiddleware = (opts = {})=>{

const contentType = headers['Content-Type'] ?? headers['content-type'];
if (!mimePattern.test(contentType)) return;
if (!mimePattern.test(contentType)) {
if (options.disableContentTypeError) {
return;
}
throw createError(415, '@middy/http-multipart-body-parser Unsupported Media Type', {
cause: contentType
});
}
return parseMultipartData(request.event, options).then((multipartData)=>{
request.event.body = multipartData;
}).catch((cause)=>{
throw createError(422, 'Invalid or malformed multipart/form-data was provided', {
throw createError(415, 'Invalid or malformed multipart/form-data was provided', {
cause

@@ -25,0 +33,0 @@ });

{
"name": "@middy/http-multipart-body-parser",
"version": "4.0.10",
"version": "4.1.0",
"description": "Http event normalizer middleware for the middy framework",

@@ -65,11 +65,11 @@ "type": "module",

"dependencies": {
"@middy/util": "4.0.10",
"@middy/util": "4.1.0",
"busboy": "1.6.0"
},
"devDependencies": {
"@middy/core": "4.0.10",
"@middy/core": "4.1.0",
"@types/aws-lambda": "^8.10.101",
"type-fest": "^3.0.0"
},
"gitHead": "e2a97d380fc4150781004092ea054f5d0fc7a8c0"
"gitHead": "c5abbac9280c3a2f30758188233a7b27367901d1"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc