-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
Version
v18.5.0
Platform
Microsoft Windows NT 10.0.19044.0 x64
Subsystem
http
What steps will reproduce the bug?
const http = require('http')
const net = require('net')
const server = http.createServer((req, res) => {
res.end(String(req.method))
})
server.listen(0, () => {
const conn = net.connect(server.address().port, 'localhost')
conn.on('data', (c) => {
console.log(c.toString())
})
conn.on('close', () => {
server.close()
})
conn.on('connect', () => {
conn.end('DESCRIBE / RTSP/1.0\r\n\r\n')
})
})
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
I would expect it to show the RTSP method, as https://nodejs.org/dist/latest-v18.x/docs/api/http.html#messagemethod doesn't seem to say that the method is not defined if it is RTSP instead of HTTP. If that is expected behavior, perhaps just a documentation update is in order.
What do you see instead?
That req.method
is undefined
Additional information
Is there any way to tell if an incoming request is RTSP rather than HTTP?
Metadata
Metadata
Assignees
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.