Commit Graph

1258 Commits

Author SHA1 Message Date
isaacs
4c5751ba97 Close #1929 zlib Respond to 'resume' events properly 2011-10-24 12:55:45 -07:00
seebees
216570b5e1 Lint 2011-10-22 14:14:40 +09:00
seebees
1ead20f274 remove auth from host
Fixes #1626
2011-10-22 14:14:40 +09:00
seebees
005d607aed http.request(url.parse(x))
http2.js

protocols object to store defaults for http and https, and use as a switch for supported protocols.
options.hostname > options.host > 'localhost'
if I have an options.auth element and I do not have an Authorization header, I do basic auth.
http.request collapses to new ClientRequest since the defaults are handled by the protocol object

test-http-url.parse*

Fixes #1390

Conflicts:

	lib/http2.js
2011-10-22 14:14:40 +09:00
seebees
be4576de7a url.resolveObject(url.parse(x), y) == url.parse(url.resolve(x, y));
added a .path property = .pathname + .search for use with http.request

And tests to verify everything.
With the tests, I changed over to deepEqual, and I would note the comment on the test
['.//g', 'f:/a', 'f://g'], which I think is a fundamental problem

This supersedes pull 1596
2011-10-22 14:14:39 +09:00
Ryan Dahl
493d3b9f7c Merge remote branch 'origin/v0.4'
Conflicts:
	ChangeLog
	Makefile
	deps/libev/wscript
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	src/platform_cygwin.cc
	test/pummel/test-net-write-callbacks.js
	test/simple/test-buffer.js
2011-10-21 18:02:30 -07:00
Igor Zinkovsky
8498ee03bc make simple\test-fs-symlink.js work on windows 2011-10-21 17:31:32 -07:00
Maciej Małecki
8f1ba251dd test: #1899 - output in child process raises an exception 2011-10-21 15:53:09 -07:00
Ryan Dahl
d5a21a29f8 getaddrinfo returns ENOTFOUND for invalid domain names
change test-http-dns-error to reflect this.
2011-10-21 15:19:53 -07:00
Ryan Dahl
efa95c2718 Fix test-eio-race on Windows 2011-10-21 14:55:28 -07:00
isaacs
caf70f5e94 Revert "Don't use a separate context for the repl."
This reverts commit b70fed48a7.
2011-10-21 13:00:37 -07:00
Igor Zinkovsky
69b73f9cf0 make process.kill a no-op on windows 2011-10-21 10:27:22 -07:00
Ryan Dahl
fafb584881 Fix race condition in test-dgram-pingpong 2011-10-21 10:21:23 -07: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
Ryan Dahl
be2320d408 Add binding to uv_getaddrinfo 2011-10-20 15:06:53 -07:00
Ryan Dahl
9d27faa2c4 Revert "Fix #1801 vm: Use 'sandbox' as global_prototype"
Accidentally committed. Revert until review.

This reverts commit 200df8641b.
2011-10-19 11:01:08 -07:00
Thomas Parslow
b0f78afe58 http: Added support for HTTP PATCH verb
Fixes #1907.
2011-10-19 19:59:16 +09:00
isaacs
b70fed48a7 Don't use a separate context for the repl.
Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
2011-10-18 18:18:32 -07:00
elliottcable
200df8641b Fix #1801 vm: Use 'sandbox' as global_prototype
Squashed commit:

(- re tests) Cleaning up the `Script` test suite.

For whatever reason, there were several duplicate test files related to `Script`
and the `'vm'` module. I removed these, and fixed a few other small issues.
(More fixes coming in subsequent commits.)

Squashes: 19e86045a0..1e3dcff4eb

(api fix:1801 new:1801) `'vm'` module uses sandbox as prototype

As described in GH-1801, the `'vm'` module was handling the `sandbox` object
provided by the API consumer in a particularly terrible and fragile fashion: it
was simply shallow-copying any enumerable properties from the sandbox onto the
global context before executing the code, and then eventually copying any values
on the global context back into the sandbox object *afterwards*.

This commit removes all of that implementation, and utilizes the passed sandbox
object as the *prototype of the context* instead. A bit of a hack, but a very
effective one.

This no longer allows for new variables created in the global context to be
placed into your sandbox after execution has completed, but that’s for the best
anyway, as it’s not very in line with the concept of a “box of passed-in
context.” I’m planning to further implement an interface for API consumers to
acquire the *actual global* from within the VM soon, thus allowing for
separation-of-concerns: providing data *to* the VM via the sandbox-prototype,
and exploring the internal environment of the VM itself.

// GitHub cruft: closes #1801

Squashes: 43b8e3c..209ed86
2011-10-18 17:56:35 -07:00
Ryan Dahl
d9bc8455cb Fix test-c-ares.js on Windows by disabling PTR test 2011-10-18 16:12:07 -07:00
Ryan Dahl
5783a52a9c Remove process.memoryUsage().vsize
Not meaningful cross platform; unused.
2011-10-18 14:31:37 -07:00
Ryan Dahl
d77ce4b998 Fixes #1860. Remove process.writeError
Breaks a few tests in "make test-message"
2011-10-18 13:12:50 -07:00
koichik
d2698d1822 http: add test for #1885 2011-10-17 16:14:35 +09:00
Igor Zinkovsky
5ca3dcd127 test: fix test-child-process-stdin and test-child-process-kill on windows 2011-10-15 22:55:24 +02:00
koichik
d6191f593d net: fix error handling in listen()
Fixes #1894.
2011-10-16 01:30:19 +09:00
koichik
68cc173c6d tls: The TLS API is inconsistent with the TCP API
Add 'secureConnect' event to tls.CleartextStream.

Fixes #1467.
2011-10-15 19:27:21 +09:00
Ben Noordhuis
6df574b744 net: properly account multi-byte chars in .bytesWritten 2011-10-15 03:24:34 +02:00
Ben Noordhuis
2f8596ee10 test: fix bug in setproctitle test
Output from `ps` may contain trailing whitespace, trim it.
2011-10-15 02:07:57 +02:00
Ben Noordhuis
b6a869ef4f test: check that EventEmitter.on == EventEmitter.addListener 2011-10-15 01:08:41 +02:00
Ben Noordhuis
018e110cd1 test: replace .addListener() calls with .on() 2011-10-15 01:08:36 +02:00
koichik
19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
koichik
a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00
isaacs
59a5262041 Fix #1882 zlib Update 'availOutBefore' value, and test 2011-10-13 16:47:51 -07:00
Simen Brekken
4b0e36810a net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
2011-10-13 16:09:14 +02:00
Ben Noordhuis
5faff9ebdf test: test long process name support
On platforms that support it: linux, freebsd, darwin
2011-10-13 15:47:05 +02:00
Ryan Dahl
3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Ryan Dahl
e911171e03 Move some slow tests to pummel 2011-10-12 16:59:00 -07:00
Ryan Dahl
7b4370e5f8 Fix test/pummel/test-watch-file.js 2011-10-12 16:19:46 -07:00
Ryan Dahl
651b8a06d6 Fix test/pummel/test-exec.js 2011-10-12 16:12:24 -07:00
Ben Noordhuis
c82828ec27 test: add test for #1869
fs.readdir() on file should raise ENOTDIR, not UNKNOWN.
2011-10-12 17:37:30 +02:00
Igor Zinkovsky
99757cbeb2 fix simple/test-fs-utimes.js on windows 2011-10-11 22:50:16 -07:00
Ryan Dahl
0e2bbac4e0 Fix test-module-load-list.js 2011-10-11 14:49:39 -07:00
Ryan Dahl
9631e29933 Remove tests relying on !process.features.uv 2011-10-11 14:47:02 -07:00
Ryan Dahl
d2b8037ed0 disable test-sendfd 2011-10-11 13:03:29 -07:00
Ryan Dahl
53c163cd5b Disable test-child-process-custom-fds.js 2011-10-11 11:27:58 -07:00
Ryan Dahl
ca4a0fce65 Remove test-child-process-channel.js 2011-10-10 14:27:52 -07:00
Ryan Dahl
982b19dbd7 Adjust listenFD deprecation message. Remove test. 2011-10-10 14:24:56 -07:00
Ryan Dahl
2c25507b81 process.stderr goes through libuv now
This commit removes one assert from test-console.js in which we check that
process.stderr.write returns true. In the case of a dump to a file we cannot
guarantee this any longer now that it goes through fs.WriteStream.
2011-10-10 14:15:44 -07:00
Igor Zinkovsky
af014c1a5e fix for simple/test-executable-path.js on windows 2011-10-07 17:48:47 -07:00
Ryan Dahl
12486a6437 Change API for sending handles
Does not support sending net.Server objects only raw TCPWrap objects.
2011-10-07 16:43:55 -07:00