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

Fix regression from 648d5ae #9215

Merged
merged 2 commits into from
Mar 3, 2024
Merged

Fix regression from 648d5ae #9215

merged 2 commits into from
Mar 3, 2024

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Mar 3, 2024

What does this PR do?

Fix regression from 648d5ae

In certain cases, Bun.serve() was sending a 0\r\n\r\n chunk when using the Content-Length header after the data has already been fully sent, which was invalid. When HTTP clients receive this, they disconnect. This caused a performance regression, but doesn't appear to have caused issues otherwise.

How did you verify your code works?

There are tests

648d5ae caused HTTP response bodies sent streamingly with a single chunk to include an extraneous 0\r\n\r\n chunk, leading valid clients to close the connection prematurely.
Copy link
Contributor

github-actions bot commented Mar 3, 2024

Copy link
Contributor

github-actions bot commented Mar 3, 2024

@Jarred-Sumner 1 files with test failures on linux-x64-baseline:

View test output

#d3070ba8cb792d0fa461df1e573354bb67e0520a

Copy link
Contributor

github-actions bot commented Mar 3, 2024

Copy link
Contributor

github-actions bot commented Mar 3, 2024

@Jarred-Sumner 1 files with test failures on bun-darwin-x64:

View test output

#d3070ba8cb792d0fa461df1e573354bb67e0520a

@Jarred-Sumner Jarred-Sumner merged commit 71405ff into main Mar 3, 2024
26 of 32 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/compressy branch March 3, 2024 08:02
Copy link
Contributor

github-actions bot commented Mar 3, 2024

❌🪟 @Jarred-Sumner, there are 12 test regressions on Windows x86_64

  • test\cli\run\transpiler-cache.test.ts
  • test\js\bun\dns\resolve-dns.test.ts
  • test\js\bun\http\fetch-file-upload.test.ts
  • test\js\bun\http\bun-server.test.ts
  • test\js\bun\shell\shelloutput.test.ts
  • test\js\bun\shell\throw.test.ts
  • test\js\node\dns\node-dns.test.js
  • test\js\node\process\process-args.test.js
  • test\js\web\fetch\body-stream-excess.test.ts
  • test\js\web\fetch\body-stream.test.ts
  • test\js\web\websocket\websocket.test.js
  • test\js\web\workers\worker.test.ts

Full Test Output

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.

None yet

1 participant