Skip to content

http surface for subclassed IncomingMessage and ServerResponse - #4

Open
puskuruk wants to merge 7 commits into
mainfrom
fix/http-surface-for-subclassed-request-response
Open

puskuruk wants to merge 7 commits into
mainfrom
fix/http-surface-for-subclassed-request-response

Conversation

@puskuruk

@puskuruk puskuruk commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What @nestjs/platform-node needs from node:http, node:net and URL: ServerOptions.IncomingMessage/ServerResponse constructors, ServerResponse<Req> with req, URL.canParse, absent headers reading as undefined, and net.Socket readable/writable flags that on-finished reads.

  • f7ac60e Make http.ServerResponse generic over its IncomingMessage and expose req
  • 7b58abc Honour ServerOptions.IncomingMessage and ServerOptions.ServerResponse constructors in createServer
  • 18250ec Add URL.canParse to the compiled WHATWG URL class
  • a6f1015 Cover ServerResponse subclassing through ServerOptions and URL.canParse with node-vs-compiled parity tests
  • ea99faa Type IncomingMessage headers as string | undefined so a header the request did not send reads as undefined, with a dictionary-missing parity test
  • 9d69ee4 Maintain net.Socket's readable and writable flags across connect, end, peer end and destroy, as the on-finished shim reads them

Verification: HTTP_SERVER_OPTIONS_PARITY_OK:5, URL_CAN_PARSE_PARITY_OK:86, DICTIONARY_MISSING_PARITY_OK:20 (scripts/test-http-server-options.mjs, test-url-can-parse.mjs, test-dictionary-missing.mjs).

Related

Independent of the other three runtime fixes (#2, #3, #5). Branch nest/base is main plus these four and is the base of #6 (Nest 1/4).

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b16e4fa7-c518-413d-847e-7f9dbc62254b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Add Carrot credits or activate Agent usage billing to use Autofix

…t carries, now that an absent IncomingMessage header reads as undefined
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