Commit Graph

133 Commits (9741291fe9b6b96f41c284032ef6ac9a4750bc63)

Author SHA1 Message Date
Ben Noordhuis 0ad005852c https: fix renegotation attack protection
Listen for the 'clientError' event that is emitted when a renegotation attack
is detected and close the connection.

Fixes test/pummel/test-https-ci-reneg-attack.js
2012-10-09 16:38:00 +02:00
Andreas Madsen be5a8e24c2 doc: consistent use of the callback argument 2012-10-08 22:58:11 +02:00
isaacs 836a06fc4f Revert "http: make http.ServerResponse emit 'end'"
This reverts commit 790d651f0d.

This makes Duplex streams unworkable, and would only ever be a special
case for HTTP responses, which is not ideal.

Intead, we're going to just bless the 'finish' event for all Writable
streams in 0.10
2012-10-03 17:40:14 -07:00
Pavel Lang b38277be26 http: add response.headersSent property
Boolean property getter. True if headers was sent, false otherwise.
2012-09-28 02:57:01 +02:00
isaacs bb207c2827 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	ChangeLog
	src/node_version.h
	test/simple/test-util-inspect.js
2012-09-12 15:13:07 -07:00
Ben Noordhuis 4870a4e3da doc: http: expand request.headers documentation 2012-09-12 02:46:53 +02:00
Ben Noordhuis 790d651f0d http: make http.ServerResponse emit 'end'
This used to be the internal 'finish' event. Make it public so API users will
know when the response has been sent completely.

Fixes #3855.
2012-09-04 22:07:48 +02:00
Ankur Oberoi a57d31595d doc: fix grammar errors 2012-08-30 00:27:00 +02:00
Eugen Dueck af699c47d1 doc: http: document res.write() `drain` return value 2012-08-01 01:45:09 +02:00
Ben Kelly c6185c8484 doc: Improve cross-linking in API docs markdown
Cross-link EventEmitter references in API docs to events.html

Fix broken cross-reference links with wrong anchor names in API docs.
2012-06-15 09:44:37 -07:00
isaacs e733dc3bc3 Fix #3388 Support listening on file descriptors
This implements server.listen({ fd: <filedescriptor> }).  The fd should
refer to an underlying resource that is already bound and listening, and
causes the new server to also accept connections on it.

Not supported on Windows.  Raises ENOTSUP.
2012-06-13 12:24:45 -07:00
Adam Malcontenti-Wilson 4099d1eeba http: make http.get() accept a URL
http.get() now accepts either a URL (as a string) or an options object.
2012-05-16 16:43:18 +02:00
isaacs 1858d1c340 Document http.STATUS_CODES
This is an incredibly useful thing to know about, and it
will likely never change.  I can't remember why we
didn't ever document it, and people keep suggesting we
do so.
2012-05-05 19:27:42 -07:00
koichik 9f3c639a9c doc: fix setEncoding()
Fixes #3209.
2012-05-05 23:10:36 +09:00
Kyle Robinson Young c9e6d3696c doc: typo fixes 2012-05-01 02:25:08 +02:00
Kyle Robinson Young 491c8d92b8 doc: add deprecated function http.createClient()
Appears in a lot of old code and core tests. Documented to show it
is deprecated.

Closes #1613.
2012-04-23 16:30:28 +02:00
Erik Dubbelboer 3d69bbfa87 net, http: add backlog parameter to .listen() 2012-04-18 21:40:25 +02:00
Dmitry Nizovtsev 1e9bcf26ce net, http, https: add localAddress option
Binds to a local address before making the outgoing connection.
2012-03-06 13:35:49 +01:00
isaacs 1d5b6f26fe Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts:
	ChangeLog
	Makefile
	deps/npm/AUTHORS
	deps/npm/html/api/bin.html
	deps/npm/html/api/bugs.html
	deps/npm/html/api/commands.html
	deps/npm/html/api/config.html
	deps/npm/html/api/deprecate.html
	deps/npm/html/api/docs.html
	deps/npm/html/api/edit.html
	deps/npm/html/api/explore.html
	deps/npm/html/api/help-search.html
	deps/npm/html/api/init.html
	deps/npm/html/api/install.html
	deps/npm/html/api/link.html
	deps/npm/html/api/load.html
	deps/npm/html/api/ls.html
	deps/npm/html/api/npm.html
	deps/npm/html/api/outdated.html
	deps/npm/html/api/owner.html
	deps/npm/html/api/pack.html
	deps/npm/html/api/prefix.html
	deps/npm/html/api/prune.html
	deps/npm/html/api/publish.html
	deps/npm/html/api/rebuild.html
	deps/npm/html/api/restart.html
	deps/npm/html/api/root.html
	deps/npm/html/api/run-script.html
	deps/npm/html/api/search.html
	deps/npm/html/api/shrinkwrap.html
	deps/npm/html/api/start.html
	deps/npm/html/api/stop.html
	deps/npm/html/api/submodule.html
	deps/npm/html/api/tag.html
	deps/npm/html/api/test.html
	deps/npm/html/api/uninstall.html
	deps/npm/html/api/unpublish.html
	deps/npm/html/api/update.html
	deps/npm/html/api/version.html
	deps/npm/html/api/view.html
	deps/npm/html/api/whoami.html
	deps/npm/html/doc/README.html
	deps/npm/html/doc/adduser.html
	deps/npm/html/doc/bin.html
	deps/npm/html/doc/bugs.html
	deps/npm/html/doc/build.html
	deps/npm/html/doc/bundle.html
	deps/npm/html/doc/cache.html
	deps/npm/html/doc/changelog.html
	deps/npm/html/doc/coding-style.html
	deps/npm/html/doc/completion.html
	deps/npm/html/doc/config.html
	deps/npm/html/doc/deprecate.html
	deps/npm/html/doc/developers.html
	deps/npm/html/doc/disputes.html
	deps/npm/html/doc/docs.html
	deps/npm/html/doc/edit.html
	deps/npm/html/doc/explore.html
	deps/npm/html/doc/faq.html
	deps/npm/html/doc/folders.html
	deps/npm/html/doc/help-search.html
	deps/npm/html/doc/help.html
	deps/npm/html/doc/index.html
	deps/npm/html/doc/init.html
	deps/npm/html/doc/install.html
	deps/npm/html/doc/json.html
	deps/npm/html/doc/link.html
	deps/npm/html/doc/list.html
	deps/npm/html/doc/npm.html
	deps/npm/html/doc/outdated.html
	deps/npm/html/doc/owner.html
	deps/npm/html/doc/pack.html
	deps/npm/html/doc/prefix.html
	deps/npm/html/doc/prune.html
	deps/npm/html/doc/publish.html
	deps/npm/html/doc/rebuild.html
	deps/npm/html/doc/registry.html
	deps/npm/html/doc/removing-npm.html
	deps/npm/html/doc/restart.html
	deps/npm/html/doc/root.html
	deps/npm/html/doc/run-script.html
	deps/npm/html/doc/scripts.html
	deps/npm/html/doc/search.html
	deps/npm/html/doc/semver.html
	deps/npm/html/doc/shrinkwrap.html
	deps/npm/html/doc/star.html
	deps/npm/html/doc/start.html
	deps/npm/html/doc/stop.html
	deps/npm/html/doc/submodule.html
	deps/npm/html/doc/tag.html
	deps/npm/html/doc/test.html
	deps/npm/html/doc/uninstall.html
	deps/npm/html/doc/unpublish.html
	deps/npm/html/doc/update.html
	deps/npm/html/doc/version.html
	deps/npm/html/doc/view.html
	deps/npm/html/doc/whoami.html
	deps/npm/lib/install.js
	deps/npm/lib/ls.js
	deps/npm/man/man1/npm.1
	deps/npm/man/man1/shrinkwrap.1
	deps/npm/man/man3/npm.3
	deps/npm/man/man3/shrinkwrap.3
	deps/npm/node_modules/request/main.js
	deps/npm/node_modules/request/package.json
	deps/npm/package.json
	deps/uv/src/unix/core.c
	deps/v8/src/conversions-inl.h
	deps/v8/src/elements.cc
	deps/v8/src/version.cc
	doc/about/index.html
	doc/api/assert.markdown
	doc/api/child_process.markdown
	doc/api/cluster.markdown
	doc/api/crypto.markdown
	doc/api/debugger.markdown
	doc/api/dgram.markdown
	doc/api/dns.markdown
	doc/api/documentation.markdown
	doc/api/events.markdown
	doc/api/fs.markdown
	doc/api/globals.markdown
	doc/api/http.markdown
	doc/api/https.markdown
	doc/api/modules.markdown
	doc/api/net.markdown
	doc/api/os.markdown
	doc/api/path.markdown
	doc/api/process.markdown
	doc/api/querystring.markdown
	doc/api/readline.markdown
	doc/api/stdio.markdown
	doc/api/stream.markdown
	doc/api/timers.markdown
	doc/api/tls.markdown
	doc/api/tty.markdown
	doc/api/url.markdown
	doc/api/util.markdown
	doc/api/vm.markdown
	doc/api/zlib.markdown
	doc/api_assets/style.css
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	src/node_version.h
	tools/doc/html.js
	tools/gyp/test/mac/app-bundle/empty.c
2012-03-03 23:38:52 -08:00
isaacs 2d44dcc8be doc: Add stability indicators to documentation 2012-03-03 17:03:52 -08:00
isaacs 7bfa5cf284 s/streams/stream/ 2012-02-29 16:04:55 -08:00
isaacs 674416fbc9 s/buffers/buffer/ 2012-02-29 16:04:55 -08:00
isaacs 4f24b20fcb doc refactor: http 2012-02-29 16:04:52 -08:00
isaacs f9df88c6da s/streams/stream/ 2012-02-27 11:18:10 -08:00
isaacs f9e464f95a s/buffers/buffer/ 2012-02-27 11:14:38 -08:00
isaacs 02e288b640 doc refactor: http 2012-02-27 11:14:34 -08:00
Ben Noordhuis 90fd70d284 docs: fix http.ClientRequest.write() documentation
'an array of integers' == very, very deprecated
2012-02-27 04:00:22 +01:00
Mikeal Rogers d530ee62cd Issue #2762. Add callback to close function. 2012-02-18 17:46:28 -08:00
Mark Nottingham 1e425e3fa7 Generate Date headers on responses when not already present. 2012-02-15 12:35:34 -08:00
Ben Noordhuis 8a6576f764 Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	common.gypi
2012-02-12 16:12:26 +01:00
Ben Noordhuis a8f357629d docs: clarify http 'data' callback
Fixes #2733.
2012-02-10 18:51:33 +01:00
isaacs 116835561d Merge remote-tracking branch 'ry/v0.6'
Conflicts:
	ChangeLog
	deps/v8/src/version.cc
	deps/v8/tools/gyp/v8.gyp
	doc/about/index.html
	doc/community/index.html
	doc/index.html
	doc/logos/index.html
	doc/template.html
	lib/path.js
	lib/querystring.js
	src/node_version.h
2012-02-06 15:43:21 -08:00
koichik a2cd31cbf1 doc: add the note about 'data' event
Refs #2691.
2012-02-05 19:11:54 +09:00
Fedor Indutny 8a98c2f1d8 http, querystring: added limits to prevent DoS 2012-01-16 02:45:05 +06: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
koichik 08a91acd76 http: better support for CONNECT method.
Introduces 'connect' event on both client (http.ClientRequest) and
server (http.Server).

Refs: #2259, #2474.
Fixes #1576.
2012-01-09 03:51:06 +01:00
koichik 57653added docs: small changes. 2012-01-07 06:44:35 +01:00
koichik dd9593ccc4 http: fix ServerResponse does not emit 'close'
Refs #2453.
2012-01-06 15:45:21 +09:00
Jeremy Martin 8c3a757ffc docs: tiny typo in http.markdown 2011-12-29 14:35:52 +01:00
koichik e1c043f43a docs: fix docs to not suggest variable leaks
Fixes #2106.
2011-12-27 17:43:58 +09:00
Ben Noordhuis 70e6f3f115 docs: document http.Server.close() semantics 2011-12-26 23:30:25 +01:00
koichik c744e925df doc: correct http.Server.listen()
Fixes #2325.
2011-12-17 00:32:29 +09:00
kyle@dontkry.com 34f34e4411 docs: fix typo
Fixes #2193.
2011-11-27 01:45:27 +09:00
Trent Mick 2cd51ef5d4 "Trailer" header should mention "Content-MD5" trailer name in this example.
Fixes #2107
2011-11-14 16:54:24 -08:00
Ben Noordhuis 1ba834bd3f docs: http: link to relevant net.Socket methods 2011-11-03 00:22:02 +01:00
Ben Noordhuis 672b453a76 docs: http: fix docs for the 'close' event 2011-11-02 17:28:46 +01:00
koichik 00aa8935d7 docs: improvement fs, http and https 2011-10-22 23:40:15 +09:00
seebees 216570b5e1 Lint 2011-10-22 14:14:40 +09:00
seebees a2eaddaa51 Documentation update
http.markdown
  note options now align with url.parse
  added note that hostname is preferred over host.
  added auth
  added not that setting an explicit Authorization header will override basic authentication with 'auth'

https.markdown
  Made a link to http.request and noted that all http.request options are valid.

url.markdown
  added path option
2011-10-22 14:14:40 +09:00
Thomas Shinnick 4cf0ce5bb4 docs: typos and minor edits in several modules
Mostly quite minor edits.  Those possibly of more interest are:

  emitter.setMaxListeners(n)

    That the limit is per event name for an emitter.

  fs.readlink()

    Not a path, but rather the symbolic link's string value, which
      would be at best a partial path, certainly not a 'resolvedPath'

  global.__filename

    This may be "well-known" but this is a full path to the module
    that referencing code is running in.  It is not the main program's
    path, unless you are in the main program.  Each module knows only
    its own path.

  server.listen(port,...)

    I actually needed this functionality... "gimme just _any_ next port"

  stream.end()
  stream.destroy()

    Yeah, everybody knows what happens to the queued data, but let's
    make it *really* explicit for the first readers.
2011-09-06 18:19:41 +02:00
Mikeal Rogers cdbecc48a1 docs: Improved http2 agent docs
Fixes #1517.
2011-08-25 00:55:51 +09:00
Ryan Dahl 6d5218bc7d Merge branch 'v0.4'
Conflicts:
	doc/api/crypto.markdown
	doc/api/modules.markdown
	src/platform_win32.cc
2011-08-01 21:52:03 -07:00
koichik c72223e2a9 Doc improvements
related to #1391, #1415.
2011-07-30 03:18:33 +09:00
Mikeal Rogers 915fa1e44f doc: http2 documentation 2011-07-26 17:00:53 +02:00
Ryan Dahl 0ed1354119 Merge branch 'v0.4'
Conflicts:
	ChangeLog
	deps/v8/src/version.cc
	doc/index.html
	src/node_version.h
	test/simple/test-url.js
	wscript
2011-07-22 03:10:38 -07:00
koichik 691497babe Doc improvements
corresponds to #1374 and #1334.
2011-07-22 00:20:47 +09:00
koichik e8bc80cf15 Doc improvements
Fixes #1334.
2011-07-16 09:45:43 +09:00
Ryan Dahl 041c983290 Merge branch 'v0.4'
Conflicts:
	deps/libev/wscript
	doc/api/modules.markdown
2011-07-14 15:52:08 -07:00
Kip Gebhardt 7097eca5a7 Adding documentation for 'agent' option in http.request().
Fixes #1243.
2011-07-14 04:06:46 +09:00
koichik 87b6dc21c8 Doc improvements
moved 'continue' event from http.Agent to http.ClientRequest.
added 'close' event to http.ClientResponse.
added 'open' event to fs.ReadStream.

Fixes #1169.
2011-07-09 13:23:28 +09:00
Ryan Dahl 59274e8a33 Merge branch 'v0.4'
Conflicts:
	lib/crypto.js
	lib/tls.js
2011-05-20 10:29:16 -07:00
David Trejo 8a0ac5b422 Add test for agent upgrade and example in docs 2011-05-19 18:44:42 -07:00
Ryan Dahl 85bc8d02fa Merge branch 'v0.4'
Conflicts:
	src/node_crypto.cc
2011-05-16 19:29:02 -07:00
Felix Geisendörfer 9d717f6bef Update http.ServerRequest docs
The documentation for 'end' was wrong, and 'close' now has an `err`
parameter.
2011-05-14 14:21:41 -07:00
isaacs 205b9beb6b Merge branch 'v0.4'
Conflicts:
	lib/tls.js
	lib/url.js
	src/node_version.h
	test/simple/test-buffer.js
	test/simple/test-url.js
2011-05-07 20:38:32 -07:00
Ryan Dahl ad487d3226 Add on('error') to http request example
for indexzero
2011-05-05 15:40:55 -07:00
koichik 1343ee8d54 Doc improvements. 2011-04-28 04:54:28 -04:00
Mark Cavage a2328dc73c Add support for Unix Domain Sockets to HTTP
fixes #979.
2011-04-25 16:52:31 -07:00
Ryan Dahl ed316ae350 Docs: some encodings contains multibyte chars.
fixes #888
2011-04-14 15:11:35 -07:00
Ryan Dahl 0f47f63746 Fix doc - no setBodyEnocoding anymore
Thanks Frederic. Closes GH-859.
2011-04-11 17:30:36 -07:00
koichik ca028f4b37 Fix docs: There were 2 descriptions of 'request' event. 2011-04-11 17:27:24 -07:00
David Trejo 6788ad413f See the <doc> section are now links to <doc>
Closes GH-839.
2011-03-28 15:53:17 -07:00
Ryan Dahl 839fb8e19b typos 2011-02-24 16:36:43 -08:00
Tim Caswell b09c5889be Add support for mutable/implicit headers for http.
This works for both ServerResponse and ClientRequest.
Adds three new methods as a couple properties to to OutgoingMessage objects.
Tests by Charlie Robbins.

Change-Id: Ib6f3829798e8f11dd2b6136e61df254f1564807e
2011-02-10 02:31:41 -08:00
Ryan Dahl 0da96cca59 typo 2011-02-04 23:05:25 -08:00
Ryan Dahl 4733d0b1f0 http: handle aborts 2011-02-04 18:07:00 -08:00
Ryan Dahl b9574b995f Expose http.getAgent 2011-01-21 13:47:27 -08:00
Ryan Dahl 032f80efea Docs for new http API 2011-01-20 18:10:15 -08:00
Silas Sewell 11b2ee7632 Various doc tweaks (2-spaces vs tabs, EOL-whitespace, repl prompt, "world" vs "World", etc...) 2010-11-21 14:33:09 -08:00
Ryan Dahl df46c8e698 Rip out the old TLS implementation 2010-11-18 16:46:37 -08:00
Oleg Efimov 8b980d729c Fix line wrapping in docs. Add tics for constants in docs text. 2010-11-18 15:41:15 -08:00
Ryan Dahl bce092aeb8 Remove leading comma examples 2010-11-17 18:25:14 -08:00
Micheil Smith e190c9616e Splitting documentation 2010-10-28 14:59:15 -07:00