nodejs / nodejs/node

`size` is unused in `OutgoingMessage.prototype._writeRaw`

Open
#57,985 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Observe that the size argument is unused in OutgoingMessage.prototype._writeRaw.

This also means that the byteLength argument is unused in OutgoingMessage.prototype._send – even though it's specified in a number of places.

Introduced in #46601 but weirdly it was unused in that commit too (perhaps lost during review?)

I worry that a bug was introduced – but if it truly should be unused, can it be removed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/_http_outgoing.js at OutgoingMessage.prototype._send and _writeRaw, then compare their arguments with the change introduced in #46601. Verify whether size and byteLength affect behavior; the work is done when their use or removal is justified and relevant existing HTTP tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.