-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Description
What is the problem this feature will solve?
Hello dear Node.js community.
A few days ago, I was giving a lesson to my students about HTTP/1.1 messaging, using Node.js http
module to provide concrete examples of how an actual implementation may be used.
Then, a student came with a very interesting remark about the fact that, contrary to what I taught them ("a Request is a message with a resource identifier in its control data - a URI"), http.IncomingMessage
exposes an attribute named url
...which always holds a URI.
Typically, the url
property holds the value /pub/WWW
when the following message is presented to the server:
GET /pub/WWW/ HTTP/1.1
Host: www.example.org
Which is a legit URI, but not a legit URL - a URL MUST start with a protocol identifier, followed by a hostname...well you get the deal.
I think she is right: the url
naming is confusing, it implies that the value held by the property is a URL, even though it is a URI.
What is the consensus about this?
Is she correct?
What is the feature you are proposing to solve the problem?
If my student is correct, would it be acceptable that, in future versions of the http
module, a property uri
is added to IncomingMessage
, and url
is marked as deprecated?
What alternatives have you considered?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status