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

Implement headersDistinct and fix NodeHTTPResponse.getAbort #18709

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zackradisic
Copy link
Member

What does this PR do?

Implements headersDistinct

Fixes null pointer dereference with NodeHTTPResponse.getAbort, use this: true in classes generation file to get the correct this value

@robobun
Copy link

robobun commented Apr 1, 2025

Updated 3:37 PM PT - Apr 1st, 2025

@zackradisic, your commit c74ab96 has 1 failures in Build #14353:


🧪   try this PR locally:

bunx bun-pr 18709

@@ -1477,6 +1477,27 @@ const IncomingMessagePrototype = {
emitErrorNextTickIfErrorListenerNT(this, err, cb);
}
},
get headersDistinct() {
if (this[Symbol.for("headersDistinctCache")]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a symbol.for?

@@ -2286,6 +2286,34 @@ it("should not emit/throw error when writing after socket.end", async () => {
}
});

it("should correctly transform rawHeaders into headersDistinct", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try running this test?

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.

3 participants