Commit Graph
25 Commits
Author SHA1 Message Date
Ryan Dahl c3ccbea5cd Upgrade http_parser to 965f91bc76b2d1601e23 2011-08-06 03:04:42 -07:00
Ryan Dahl 55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Ryan Dahl c783aefb0f http-parser: Error on EOF errors 2011-02-04 18:07:00 -08:00
Ryan Dahl 0866ecaf3f ... 2011-01-20 18:10:15 -08:00
Ryan Dahl 12554380d5 Add support for SSDP methods -_- 2010-11-21 21:44:23 -08:00
Ryan Dahl 57d8172906 query-string unescape moved to js land 2010-11-18 15:12:31 -08:00
Ryan Dahl 5f935f6c14 Fast buffers for http-parser 2010-09-09 11:03:49 -07:00
Paul Querna e65c27062f Move http parser to extension model. 2010-07-14 10:36:24 -07:00
Ryan Dahl d49d53fd49 Expose new HTTP methods 2010-06-30 00:54:08 -07:00
Blake Mizerany 8c8534046c fix whitespace errors 2010-06-29 23:59:24 -07:00
Ryan Dahl c2e2479cc5 Fix Linux build 2010-06-15 20:04:29 -07:00
isaacs 4ce100fa62 A replacement for decodeURIComponent that doesn't throw.
And add a few more tests.
2010-06-15 19:28:09 -07:00
Ryan Dahl 9be6c501ec Upgrade http-parser 2010-06-06 17:41:03 -07:00
Ryan Dahl 35c14f637e In HTTP parser, proxy return value of onHeadersComplete 2010-05-25 19:25:38 -07:00
Ryan Dahl 2fca40e44f Upgrade http-parser 2010-05-25 19:25:35 -07:00
Ryan Dahl cbd2c3945b Throwing in a callback should kill the process
There is a difference between errors which happen to a socket - like
receiving EPIPE - an exceptional situation but ultimately okay and the
situation where code throws in a callback - which is not okay.

Fixes test/simple/test-http-exceptions.js

TODO: explain this in docs.
2010-05-20 15:23:36 -07:00
Ryan Dahl ac3a2d899a Changes to work on Solaris 10 2010-05-14 16:38:17 -07:00
Ryan Dahl 760bba5518 Support Upgrade in HTTP messages
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.
2010-04-14 03:52:15 -07:00
Ryan Dahl 54d4efd44b Upgrade http-parser
Now at version 6f72c780f0a237a775150a9963bcdf5299685cde
2010-03-22 09:00:43 -07:00
Ryan Dahl 7c9919f810 Remove some unnecessary handlescopes 2010-02-02 18:37:14 -08:00
Ryan Dahl bf803f478b Reimplment Buffers 2010-01-27 15:40:09 -08:00
Ryan Dahl a668d07484 Clean up http_parser binding - add asserts 2010-01-26 18:37:16 -08:00
Ryan Dahl 741e3fa91b HTTP works somewhat on net2 now
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
2010-01-25 17:55:08 -08:00
Ryan Dahl dda1d681f7 Provide buffer in HTTPParser callbacks. 2010-01-24 14:12:15 -08:00
Ryan Dahl 42ee16978e Implement new http-parser binding using Buffer 2010-01-24 11:21:45 -08:00