This allows for web servers to be "hijacked" and used as Web Socket servers
(or other). You simply listen for requests as normal, but check if
req.upgrade === true
If so, this will be the last request of the connection. It's your job now to
hijack req.connection and start reading from it. req.upgradeHead is a buffer
containing the first part of the new protocol communication (in the case it
arrived on the same packet).
This needs tests and documentation. API subject to change.
Instead of installing the files in /usr/lib/node/libraries and loading them
from the file system, the files are built-in to the node executable.
However, they are only compiled on demand.
The reasoning is:
1. Allow for more complex internal javascript. In particular,
process.stdout and process.stdin can be js implemented streams.
2. Ease system installs. Loading from disk each time is unnecessary
overhead. Note that there is no "system" path for modules anymore. Only
$HOME/.node_libraries.
Deprecate the URI module and remove tests for it.
- Rename "uri" to "url".
- Use the "url" module instead of the "uri" module.
- Remove the url parsing from http.js
- Update http.cat with the changed field names.
- Update tests for changes to http.js
- Update documentation for changes in http.js
Express (my framework) uses them as a default
response body when non is present. Others
might use them for something as well.
Beats duplicating the list :D
Change the http.Client API so that it provides a single request() method
taking an optional parameter to specify the HTTP method (defaulting to
"GET"), instead of the five methods get(), head(), post(), del() and put().