A couple other small fixes:
If the keys of an object were all numeric they should be quoted. This
way, you can now hypothetically copy and paste the output into your code
(if the object doesn't contain any circular objects, deeply nested
objects, Dates, RegExps or functions. I think).
If a nested object isn't being recursed into, output "[Object]" as
opposed to "[object Object]".
If an object is longer than the max width but it is one line no matter
what, then don't put the closing brace on a new line.
Fix some formatting issues to try and match Node's style guidelines.
- Rename fs.cat to fs.readFile
- Move file.write to fs.writeFile
- Allow strings for the flag argument to fs.open
("r", "r+", "w", "w+", "a", "a+")
- Remove the unused 'File' module / class
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.
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