Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
58dcf304
Unverified
Commit
58dcf304
authored
Nov 08, 2022
by
JJ Kasper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fix(stream): Allows body larger than 16 KiB with middleware
parent
f3fc9126
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
body-streams.ts
packages/next/server/body-streams.ts
+8
-2
No files found.
packages/next/server/body-streams.ts
View file @
58dcf304
...
...
@@ -90,8 +90,14 @@ export function getClonableBody<T extends IncomingMessage>(
const
input
=
buffered
??
readable
const
p1
=
new
PassThrough
()
const
p2
=
new
PassThrough
()
input
.
pipe
(
p1
)
input
.
pipe
(
p2
)
input
.
on
(
'data'
,
(
chunk
)
=>
{
p1
.
push
(
chunk
)
p2
.
push
(
chunk
)
})
input
.
on
(
'end'
,
()
=>
{
p1
.
push
(
null
)
p2
.
push
(
null
)
})
buffered
=
p2
return
p1
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment