Invalid body doesn't error
See original GitHub issuetest('https://github.com/mcollina/undici/issues/807', (t) => {
t.plan(2)
const server = net.createServer(socket => {
socket.write('HTTP/1.1 200 OK\r\n')
socket.write('Content-Length: 1\r\n\r\n')
socket.write('11111\r\n')
})
t.teardown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.teardown(client.destroy.bind(client))
client.request({
path: '/',
method: 'GET'
}, (err, data) => {
t.error(err)
data.body.resume().on('end', () => {
t.fail()
})
})
})
})
I think the above request should fail. The body is longer than content-length.
Issue Analytics
- State:
- Created 2 years ago
- Comments:26 (26 by maintainers)
Top Results From Across the Web
“Invalid Body” error in sign in page : r/help - Reddit
I'm trying to log in through the browser using Google Sign In, and I keep getting the error “Invalid Body”, would anyone know...
Read more >HTTP Return Code for "Invalid" Body - Stack Overflow
Let's say I have a REST POST end-point: www.foo.com/validate/X where X represents a number. My server-side pseudocode looks like this:
Read more >Discord Invalid Form Body - Code Help - Glitch Support
My code worked before, and now it shows the error “DiscordAPIError: Invalid Form Body, type: Value “{u'type': u'text'}” is not int.” Do you...
Read more >Error and Warning Dictionary | Twilio
Explore the full list of all possible Twilio REST API error codes. ... WARNING. Dial: Twilio does not support calling this number or...
Read more >discord api error invalid form body - You.com | The AI Search ...
The Discord API Error: Invalid Form Body means that the body of the API request is not formatted correctly or is missing critical...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I haven’t forgotten and will get to this as soon as I can.
I’ve been working non stop with deploying a new system into production. I think I can have a PR by end of week.