Commit Graph
52 Commits
Author SHA1 Message Date
Ben Noordhuis 7788a6bf85 src: pass node_isolate to Undefined() 2013-01-07 17:39:58 +01:00
Ben Noordhuis 109f73b2c0 src: pass node_isolate to True() and False() 2013-01-07 17:39:57 +01:00
Ben Noordhuis 6573fc3502 src: pass node_isolate to Integer::New 2013-01-07 17:39:57 +01:00
Ben Noordhuis 412b3cee05 src: pass node_isolate to String::Empty 2013-01-07 17:39:57 +01:00
Ben Noordhuis 109f8e2773 node_http_parser: fix whitespace errors 2012-10-02 14:50:25 +02:00
isaacs 7b3fb22290 typo in node_http_parser 2012-04-18 09:36:45 -07:00
Ben Noordhuis 1a49df5fa9 http: root JS objects in HandleScope with Local<> 2012-03-30 21:24:01 +02:00
Ben Noordhuis 17524432ff Fix Engrish in error messages. 2012-03-30 16:07:05 +02:00
Felix Geisendörfer 18240193ba Expose http parse error codes
Currently http parse errors do not expose the error details available
from http_parser. This patch exposes the error code as `err.code`.
2012-03-19 19:00:16 -07:00
Ben Noordhuis 4472f7bbc3 http: use HTTP_METHOD_MAP macro 2012-03-12 02:23:34 +01:00
Nathan Rajlich 36761b2055 process: expose the http_parser version in process.versions 2012-03-10 00:22:42 +01:00
Ben Noordhuis ff4a9d381d core: use proper #include directives 2012-03-10 00:14:14 +01:00
Ben Noordhuis de5e3f6a6f http: support PURGE request method 2012-02-20 16:12:48 +01:00
Ben Noordhuis 74a8215a86 Revert support for isolates.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.

Hence, this commit backs out all isolates-related changes.

Good bye, isolates. We hardly knew ye.
2012-02-06 15:44:42 +01:00
Ryan Dahl 8b28d599a7 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	configure
	src/node_version.h
2012-01-09 11:20:22 -08:00
Ryan Dahl f3da6c6c04 Potential fix for #2438
- Save StringPtr if the header hasn't been completely received yet after one
  packet.
- Add one to num_fields and num_values. They were actually one less than the
  number of fields and values.
- Remove always_inline makes debugging difficult, and has negligible
  performance benefits.
2012-01-03 17:43:39 -08:00
Ben Noordhuis add4cfcf5f Merge branch 'v0.6'
Conflicts:
	src/platform_win32.cc
2011-12-29 01:56:44 +01:00
Ryan Dahl 448c5e07ca Revert "Add HandleScope to http-parser binding"
This commit did not actually fix the production crashes.

This reverts commit 73cf8e82e7.
2011-12-28 14:08:19 -08:00
Ryan Dahl f7f8af8420 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	lib/_debugger.js
2011-12-21 12:17:23 -08:00
Ryan Dahl 73cf8e82e7 Add HandleScope to http-parser binding
Fixes production crashes. We were not able to reproduce in the test suite.
2011-12-21 12:01:41 -08:00
Ryan Dahl 06d86ebe84 Move node_http_parser.cc global vars into node_vars.h 2011-12-07 13:31:55 -08:00
Ben Noordhuis cdcb1118c8 Remove stray NODE_MODULE() semi-colons. 2011-11-09 16:34:09 +01:00
Maciej Małecki fc61134b1a doc: fix links
Changes:

  * 'http://github.com' => 'https://github.com'
  * 'https://github.com/ry/node' => 'https://github.com/joyent/node'
  * 'https://github.com/ry/http-parser' =>
    'https://github.com/joyent/http-parser'
  * old issue links
  * wiki link
2011-11-01 22:26:52 +01:00
Ben Noordhuis 680765abec http: fix gcc 3.x build, don't use always_inline 2011-10-25 19:18:58 +00:00
Ben Noordhuis 84d0b1bcc5 http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
2011-10-20 19:19:02 -07:00
Thomas Parslow b0f78afe58 http: Added support for HTTP PATCH verb
Fixes #1907.
2011-10-19 19:59:16 +09:00
Peter Bright 6ac8c55989 Make MSVS build.
MSVS settings don't actually need to be guarded by conditions. gyp will do
the right thing.
2011-08-06 22:39:28 -07:00
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