1. Support streaming in the simple case. Put huge warnings around the
buffering API.
2. Support nested multipart messages.
3. Support various kinds of multipart messages, including all the various
absurdities of multipart email messages.
4. Error out on various invalid types of data that might come through.
5. Gracefully several edge cases that occur when the chunk size is smaller
than the boundary length, or cuts into the \r\n, etc.
6. Provide both positive and negative tests.
It seems that the current __filename module global is mainly used to
determine the directory the current module is in. To make that
easier, this patch adds support for a __dirname module global
directly.
A promise will throw an exception unless an error handler is attached in the
same "tick" that the error is emitted. This is to avoid silent promise
failures.
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
Also, make a slight change from original on url-module to put the
spacePattern into the function. On closer inspection, it turns out that the
nonlocal-var cost is higher than the compiling-a-regexp cost.
Also, documentation.
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().
Multipart parts now have a name and filename property. Those are the
same as:
part.headers['content-disposition'].name
part.headers['content-disposition'].filename
This patch also updates and improves the docs for the multipart module.