-
Notifications
You must be signed in to change notification settings - Fork 539
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
fetch: following a 307 for a PUT with empty body fails #2027
Labels
bug
Something isn't working
Comments
macno
added a commit
to macno/undici
that referenced
this issue
Mar 27, 2023
macno
added a commit
to macno/undici
that referenced
this issue
Mar 27, 2023
KhafraDev
pushed a commit
that referenced
this issue
Mar 28, 2023
7 tasks
metcoder95
pushed a commit
to metcoder95/undici
that referenced
this issue
Jul 21, 2023
crysmags
pushed a commit
to crysmags/undici
that referenced
this issue
Feb 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description
following an error with octokit, we discovered that a fetch with method PUT (but I guess also other methods too) and an empty body
{body: ''}
that receives a 307 from the server, fails with the codeAssertionError [ERR_ASSERTION]: '' == true
this is the error we see with octokit
Reproducible By
Expected Behavior
that fetch follows the redirect without any error
Logs & Screenshots
Environment
we see the error with the following envs:
Additional context
Issue seems to be here because
assert('')
throws an errorI will propose to drop the assertion since a check that verifies
body.source
is not null is already present hereHappy to provide a PR if needed
The text was updated successfully, but these errors were encountered: