Skip to content

fix(node/http): test-http-outgoing-proto#18340

Closed
DonIsaac wants to merge 1 commit intomainfrom
don/fix/http-outgoing-proto
Closed

fix(node/http): test-http-outgoing-proto#18340
DonIsaac wants to merge 1 commit intomainfrom
don/fix/http-outgoing-proto

Conversation

@DonIsaac
Copy link
Contributor

What does this PR do?

Gets parallel/test-http-outgoing-proto.js passing.

How did you verify your code works?

There's a test

@robobun
Copy link
Collaborator

robobun commented Mar 20, 2025

Updated 5:48 PM PT - Mar 20th, 2025

@DonIsaac, your commit f208be2 has some failures in Build #13636


🧪   try this PR locally:

bunx bun-pr 18340

// {
// code: 'ERR_METHOD_NOT_IMPLEMENTED',
// name: 'Error',
// message: 'The _implicitHeader() method is not implemented'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if node intentionally does not implement _implicitHeader or if they just... didn't implement it

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please avoid modifying Node.js tests unnecessarily.

@DonIsaac DonIsaac marked this pull request as ready for review March 21, 2025 00:21
@DonIsaac DonIsaac requested review from a team and paperclover and removed request for a team March 21, 2025 00:21
}

// this[kUniqueHeaders] = parseUniqueHeadersOption(options.uniqueHeaders);
this[kUniqueHeaders] = new Set();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this a getter so it's lazy?

Copy link
Collaborator

Choose a reason for hiding this comment

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

or if it's unused, then can we avoid the work?

}

const validateHeaderName = (name, label?) => {
function validateHeaderName(name: unknown, label?: string): asserts name is string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should move this whole function to native code

Copy link
Collaborator

Choose a reason for hiding this comment

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

it likely already is being done

throw $ERR_HTTP_HEADERS_SENT("set");
}
validateHeaderName(name);
validateHeaderValue(name, value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, setHeader should just do all of these validations including probably creating the header too.


addTrailers(headers) {
throw new Error("not implemented");
this._trailer = "";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suspect we don't actually support trailers in the HTTP server.

Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

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

comments

@DonIsaac
Copy link
Contributor Author

superseded by #18482

@DonIsaac DonIsaac closed this Mar 25, 2025
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