Some HTTP clients include a charset parameter in the Content-Type, e.g:
multipart/form-data; charset=utf-8; boundary=0xKhTmLbOuNdArY
This patch makes the multipart parser more forgiving towards unexpected
information included in the Content-Type header.
However it's not working very well: Hitting a 'hello world' server with many
requests (ab -t 60 -c 10) will cause it to crash with the following error.
Obtained 3 stack frames.
./node(_Z11print_tracev+0x1c) [0x80d1b3c]
./node(_ZN4node6Parser7ExecuteERKN2v89ArgumentsE+0x69) [0x80d3759]
./node [0x811f44b]
TypeError: Already parsing a buffer
at Socket.<anonymous> (/home/ryan/projects/node/lib/http2.js:393:20)
at IOWatcher.callback (/home/ryan/projects/node/lib/net.js:81:12)
at node.js:985:9
at node.js:989:1
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.
This is actually undesireable as it takes away control from the user who
may want to pause/resume to throttle the upload stream, or synchronize
it with disk flushing.
I actually ran into memory issues when trying to stream huge files to
disc as the file module was building up a huge action buffer. This can
now easily be avoided like this:
part.addListener('body', function(chunk) {
req.pause();
file.write(chunk).addCallback(function() {
req.resume();
});
}
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