Skip to content
Permalink
Branch: master
Commits on Jul 12, 2019
  1. doc: add missing types

    lpinca authored and Trott committed Jul 10, 2019
    Document the types returned by the `readable.readableObjectMode`,
    `writable.writableLength`, and `writable.writableObjectMode` getters.
    
    PR-URL: #28623
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
Commits on Jul 10, 2019
  1. http2: override authority with options

    lpinca committed Jul 7, 2019
    Make `options.host` and `options.port` take precedence over
    `authority.host` and `authority.port` respectively.
    
    PR-URL: #28584
    Fixes: #28182
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Commits on Jul 6, 2019
  1. doc: add description for the listener argument

    lpinca committed Jul 1, 2019
    Clarify that `listener` is registered as a one-time listener of the
    `'connect'` event.
    
    PR-URL: #28500
    Fixes: #28217
    Reviewed-By: Roman Reiss <me@silverwind.io>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Commits on Jul 1, 2019
  1. http2: remove square brackets from parsed hostname

    lpinca committed Jun 24, 2019
    Make `http2.connect()` work when using URLs with literal IPv6
    addresses.
    
    Fixes: #28216
    
    PR-URL: #28406
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Commits on Jun 8, 2019
  1. http: remove default 'timeout' listener on upgrade

    lpinca committed Feb 10, 2019
    Remove the default listener of the `'timeout'` event from the socket
    before emitting the `'connect'` or `'upgrade'` event.
    
    PR-URL: #26030
    Fixes: #23857
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
Commits on Jun 4, 2019
  1. net: make writeAfterFIN() return false

    lpinca authored and danbev committed May 31, 2019
    If `false` is not returned a readable stream piped into the socket
    might continue reading indefinitely until the process goes out of
    memory.
    
    PR-URL: #27996
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Commits on Jun 1, 2019
  1. http: call write callback even if there is no message body

    lpinca authored and Trott committed May 20, 2019
    Ensure that the callback of `OutgoingMessage.prototype.write()` is
    called when `outgoingMessage._hasBody` is `false` (HEAD method, 204
    status code, etc.).
    
    Refs: #27709
    
    PR-URL: #27777
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
Commits on May 29, 2019
  1. doc: fix typo in pipe from async iterator example

    lpinca committed May 25, 2019
    PR-URL: #27870
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
    Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
Commits on May 25, 2019
  1. tls: support the hints option

    lpinca committed May 22, 2019
    Make `tls.connect()` support the `hints` option for feature parity with
    `net.connect()`.
    
    PR-URL: #27816
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
Commits on May 23, 2019
  1. http2: support net.Server options

    lpinca authored and danbev committed May 20, 2019
    Make `http2.createServer()` support `net.Server` options.
    
    PR-URL: #27782
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Commits on May 19, 2019
  1. http: always call response.write() callback

    lpinca authored and addaleax committed May 15, 2019
    Ensure that the callback of `OutgoingMessage.prototype.write()` is
    called even when writing empty chunks.
    
    Fixes: #22066
    
    PR-URL: #27709
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  2. http: do not default to chunked encoding for TRACE

    lpinca authored and addaleax committed May 13, 2019
    Fixes: #25783
    
    PR-URL: #27673
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  3. tls: support `net.Server` options

    lpinca authored and Trott committed May 13, 2019
    Pass `tls.Server` constructor options to the parent constructor.
    
    PR-URL: #27665
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Commits on May 13, 2019
  1. http2: do not override the allowHalfOpen option

    lpinca authored and danbev committed May 9, 2019
    The constructors of `tls.Server` and `Http2Server` call the super
    constructors without options so the `allowHalfOpen` option is never used
    regardless of its value.
    
    PR-URL: #27623
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on May 8, 2019
  1. test: fix flaky test-tls-multiple-cas-as-string

    lpinca authored and danbev committed May 5, 2019
    The following error is emitted in a nondeterministic way on the server
    side socket on macOS:
    
    ```
    events.js:173
          throw er; // Unhandled 'error' event
          ^
    
    Error: read ECONNRESET
        at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27)
    Emitted 'error' event at:
        at emitErrorNT (internal/streams/destroy.js:91:8)
        at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
        at processTicksAndRejections (internal/process/task_queues.js:84:9)
    ```
    
    Prevent the error from being emitted by moving the `socket.end()` call
    to the client. Also, run tests in parallel and use `common.mustCall()`.
    
    PR-URL: #27569
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Commits on May 6, 2019
  1. test: deflake test-tls-js-stream

    lpinca committed Apr 29, 2019
    `socket.destroy()` can destory the stream before the chunk to write
    with `socket.end()` is actually sent. Furthermore `socket.destroy()`
    destroys `p` and not the actual raw socket. As a result it is possible
    that the connection is left open.
    
    Remove `socket.destroy()` to ensure that the chunk is sent. Also use
    `common.mustCall()` to ensure that the `'secureConnection'` and
    `'secureConnect'` events are emitted exactly once.
    
    PR-URL: #27478
    Fixes: #26938
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Commits on May 2, 2019
  1. test: refactor and deflake test-tls-sni-server-client

    lpinca authored and Trott committed Apr 26, 2019
    - Run all tests in parallel.
    - Move `socket.end()` call to client.
    - Use `common.mustCall()` and `common.mustNotCall()`.
    
    Fixes: #27219
    Refs: #27300
    
    PR-URL: #27426
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
Commits on Apr 30, 2019
  1. test: remove flaky designation for test-tls-sni-option

    lpinca authored and Trott committed Apr 26, 2019
    Refs: #27300
    
    PR-URL: #27425
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
Commits on Apr 27, 2019
  1. test: refactor net-connect-handle-econnrefused

    lpinca committed Mar 30, 2019
    - Remove unneeded server
    - Use `common.PORT`
    
    PR-URL: #27014
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  2. test: move test-net-connect-handle-econnrefused

    lpinca committed Mar 30, 2019
    The port used in the test could be taken by another process before
    the callback of `server.close()` is called. Move it to sequential.
    
    PR-URL: #27014
    Fixes: #26907
    Refs: #18257 (comment)
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Commits on Apr 16, 2019
  1. stream: inline onwriteStateUpdate()

    lpinca authored and danbev committed Apr 12, 2019
    The function is very simple and is only called from `onwrite()`.
    
    PR-URL: #27203
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Masashi Hirano <shisama07@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Commits on Apr 11, 2019
  1. net: inline maybeDestroy()

    lpinca committed Apr 8, 2019
    `maybeDestroy()` is only called from the listener of the `'end'` event.
    That event is only emitted after the socket is connected (after `UV_EOF`
    is read) and after `socket.readable` is set to `false`.
    
    PR-URL: #27136
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Commits on Apr 3, 2019
  1. doc: document the 'pause' and 'resume' events

    lpinca authored and danbev committed Mar 29, 2019
    PR-URL: #26999
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Commits on Apr 2, 2019
  1. doc: improve the doc of the 'information' event

    lpinca authored and danbev committed Mar 30, 2019
    - Add missing argument
    - Reword a sentence
    - Rename the `res` argument to `info` in the example to avoid confusion
    
    PR-URL: #27009
    Fixes: #26905
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Commits on Mar 30, 2019
  1. url: add ws: and wss: to slashedProtocol set

    lpinca authored and targos committed Mar 27, 2019
    Fix cases where the pathname is incorrectly parsed as `null`.
    
    PR-URL: #26941
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Commits on Mar 21, 2019
  1. test: refresh tmpdir in child-process-server-close

    lpinca authored and ZYSzys committed Mar 18, 2019
    PR-URL: #26729
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
    Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Mar 13, 2019
  1. doc: fix misleading sentence in http.md

    lpinca authored and BridgeAR committed Mar 6, 2019
    Calling `response.end(data)` is not 100% equivalent to calling
    `response.write(data)` followed by `response.end()`.
    
    PR-URL: #26465
    Fixes: #26005
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Commits on Mar 5, 2019
  1. doc: clarify http.Agent constructor options

    lpinca authored and BridgeAR committed Mar 3, 2019
    PR-URL: #26412
    Fixes: #26357
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Masashi Hirano <shisama07@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  2. stream: ensure writable.destroy() emits error once

    lpinca authored and BridgeAR committed Feb 12, 2019
    Prevent the `'error'` event from being emitted multiple times if
    `writable.destroy()` is called with an error before the `_destroy()`
    callback is called.
    
    Emit the first error, discard all others.
    
    PR-URL: #26057
    Fixes: #26015
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Mar 2, 2019
  1. doc: sort http.request() options alphabetically

    lpinca committed Feb 16, 2019
    PR-URL: #26152
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  2. doc: add documentation for the defaultPort option

    lpinca committed Feb 16, 2019
    PR-URL: #26152
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Commits on Feb 13, 2019
  1. test: use emitter.listenerCount() in test-http-connect

    lpinca authored and addaleax committed Feb 10, 2019
    Use `emitter.listenerCount()` instead of the `length` property of the
    array returned by `emitter.listeners()`.
    
    PR-URL: #26031
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
Commits on Feb 12, 2019
  1. test: refactor two http client timeout tests

    lpinca committed Jan 13, 2019
    Refactor test-http-client-set-timeout and
    test-http-client-timeout-option-with-agent.
    
    PR-URL: #25473
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Feb 7, 2019
  1. test: refactor test-http-agent-timeout-option

    lpinca committed Feb 2, 2019
    There is no need to establish a TCP connection. It is sufficient to
    test that the listener that forwards the `'timeout'` event from the
    socket to the `ClientRequest` instance is added to the socket.
    
    PR-URL: #25886
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
Commits on Feb 6, 2019
  1. http: remove redundant call to socket.setTimeout()

    lpinca authored and addaleax committed Feb 4, 2019
    `Socket.prototype.setTimeout()` clears the previous timer before setting
    a new one.
    
    Refs: #25748 (comment)
    
    PR-URL: #25928
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Older
You can’t perform that action at this time.