createCall's incoming request is not a readable stream
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- node.js, typescript
Research direction
Start at unenv/runtime/fetch/index, where the issue imports createCall, and run the provided reproduction with a request body of 'test'. Trace how the incoming request is constructed; done means its readable state, readableLength, and content-length header match the stated Node server behavior.
Written by the indexing model from the issue text.
Description
Environment
NA
Reproduction
import { createCall } from "unenv/runtime/fetch/index";
createCall(async (req, res) => {
console.log(req.readable); // false
console.log(req.readableLength); // 0
console.log(req.header["content-length"]); //undefined
})({url: '/', body: 'test'})
Describe the bug
While the real node implementation of a server would have req.readable = true and readableLength = 4 as well as a content-length = 4 header
Additional context
No response
Logs
No response
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from unjs/node-mock-http
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
unjs/node-mock-http#38 ·
-
Dependency Dashboard Open
Difficulty 3/5 1-2 days Newbie friendliness 15/100
unjs/node-mock-http#2 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
unjs/node-mock-http#5 · 7 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 42/100
unjs/node-mock-http#9 · 2 comments · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
unjs/node-mock-http#7 · 1 comment ·
All issues in unjs/node-mock-http
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·