Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really fix proxy code to work with built-in fetch #1519

Merged
merged 1 commit into from
Feb 13, 2023
Merged

Conversation

mqp
Copy link
Collaborator

@mqp mqp commented Feb 13, 2023

This fixes a bug I made in #1511 because I didn't understand that in some cases next.js will hand us a NextApiRequest that is an ReadableStream with the request contents in and of itself, rather than having a body property.

The duplex: 'half' thing is a small change required by the built-in fetch vs. our previous fetch implementation in cases that the body of the fetch request is a ReadableStream. See nodejs/node#46221 and linked issues.

@vercel
Copy link

vercel bot commented Feb 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
dev 🔄 Building (Inspect) Feb 13, 2023 at 10:58PM (UTC)
docs ✅ Ready (Inspect) Visit Preview Feb 13, 2023 at 10:58PM (UTC)
prod 🔄 Building (Inspect) Feb 13, 2023 at 10:58PM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant