Skip to content

Commit

Permalink
Fixing payload middleware by passing through multipart requests
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jan 29, 2019
1 parent 8fcd718 commit 190e0d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function parse (req, res, next) {
}

function payload (req, res, next) {
if (hasBody(req.method)) {
if (hasBody(req.method) && (req.headers["content-type"] || "").includes("multipart") === false) {
const obj = req.httpVersionMajor === 1 ? req : res,
max = req.server.config.maxBytes;
let body = "",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an HTTP/HTTP2 REST API framework",
"version": "10.2.7",
"version": "10.2.8",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down

0 comments on commit 190e0d7

Please sign in to comment.