Sergei Osipov
458a38c904
src: bring 425 status code name into accordance with RFC 8470
...
PR-URL: https://github.com/nodejs/node/pull/29880
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-10 10:48:13 -07:00
Anna Henningsen
6ab28486c3
http: reset parser.incoming when server request is finished
...
This resolves a memory leak for keep-alive connections and does not
regress in the way that 779a05d5d1 did by waiting for
the incoming request to be finished before releasing the
`parser.incoming` object.
Refs: https://github.com/nodejs/node/pull/28646
Refs: https://github.com/nodejs/node/pull/29263
Fixes: https://github.com/nodejs/node/issues/9668
PR-URL: https://github.com/nodejs/node/pull/29297
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-08-26 15:22:04 +02:00
Matteo Collina
a5d9288788
Revert "http: reset parser.incoming when server response is finished"
...
This reverts commit 779a05d5d1 .
PR-URL: https://github.com/nodejs/node/pull/29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-08-24 09:56:19 -07:00
Robert Nagy
bdf07f4317
http: simplify drain()
...
Simplify and slightly optimize draining outgoing http streams. Avoid
extra event listener and inline with rest of the drain logic.
PR-URL: https://github.com/nodejs/node/pull/29081
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-08-19 12:56:08 -07:00
Robert Nagy
0daec61b9b
http: replace superfluous connection property with getter/setter
...
PR-URL: https://github.com/nodejs/node/pull/29015
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-08-17 06:21:59 -07:00
Robert Nagy
d30354859c
http: follow symbol naming convention
...
PR-URL: https://github.com/nodejs/node/pull/29091
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-08-14 15:54:01 -07:00
Robert Nagy
7635b7cc27
http: remove duplicate check
...
`socketOnDrain()` performs the exact same check and doesn't return
anything.
PR-URL: https://github.com/nodejs/node/pull/29022
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-08-11 14:48:12 -07:00
Anna Henningsen
779a05d5d1
http: reset parser.incoming when server response is finished
...
This resolves a memory leak for keep-alive connections with a naïve
approach.
Fixes: https://github.com/nodejs/node/issues/9668
PR-URL: https://github.com/nodejs/node/pull/28646
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-07-28 22:14:55 +02:00
vmarchaud
0ebf01dc53
perf_hooks: add HttpRequest statistics monitoring #28445
...
```js
const { PerformanceObserver, performance } = require('perf_hooks');
const http = require('http');
const obs = new PerformanceObserver((items) => {
const entry = items.getEntries()[0];
console.log(entry.name, entry.duration);
});
obs.observe({ entryTypes: ['http'] });
const server = http.Server(function(req, res) {
server.close();
res.writeHead(200);
res.end('hello world\n');
});
server.listen(0, function() {
const req = http.request({
port: this.address().port,
path: '/',
method: 'POST'
}).end();
});
```
PR-URL: https://github.com/nodejs/node/pull/28486
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-07-12 00:36:27 +02:00
Anna Henningsen
ba565a3734
http: improve parser error messages
...
Include the library-provided reason in the Error’s `message`.
Fixes: https://github.com/nodejs/node/issues/28468
PR-URL: https://github.com/nodejs/node/pull/28487
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-07-05 22:36:53 -07:00
Luigi Pinca
d5577f0395
http: remove default 'timeout' listener on upgrade
...
Remove the default listener of the `'timeout'` event from the socket
before emitting the `'connect'` or `'upgrade'` event.
PR-URL: https://github.com/nodejs/node/pull/26030
Fixes: https://github.com/nodejs/node/issues/23857
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-08 13:35:37 +02:00
Anatoli Papirovski
58b1fe7bd1
http: fix socketOnWrap edge cases
...
Properly handle prependListener wrapping on http server
socket, in addition to on and addListener.
PR-URL: https://github.com/nodejs/node/pull/27968
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 10:17:50 +02:00
himself65
be26f6e9d5
http: add an alias at addListener on Server connection socket
...
Fixes: https://github.com/nodejs/node/issues/27199
PR-URL: https://github.com/nodejs/node/pull/27325
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-19 23:35:10 +02:00
Ali Ijaz Sheikh
c30ef3cbd2
http, http2: remove default server timeout
...
Timing out and closing the socket after two minutes have elapsed is
surprising and problematic for users. This behavior was specific to
Node.js, and doesn't seem to be common in other language runtimes.
Fixes: https://github.com/nodejs/node/issues/27556
PR-URL: https://github.com/nodejs/node/pull/27558
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-09 08:54:04 -07:00
Daniel Beckert
ece507394a
src: do not reuse async resource in http parsers
...
Change resource being used, previously HTTParser was being reused.
We are now using IncomingMessage and ClientRequest objects. The goal
here is to make the async resource unique for each async operatio
Refs: https://github.com/nodejs/node/pull/24330
Refs: https://github.com/nodejs/diagnostics/issues/248
Refs: https://github.com/nodejs/node/pull/21313
Co-authored-by: Matheus Marchini <mat@mmarchini.me >
PR-URL: https://github.com/nodejs/node/pull/25094
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-04-22 11:51:46 -07:00
Michaël Zasso
908292cf1f
lib: enforce the use of Object from primordials
...
PR-URL: https://github.com/nodejs/node/pull/27146
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2019-04-12 05:38:45 +02:00
Anatoli Papirovski
47f5cc1ad1
lib: faster FreeList
...
Make FreeList faster by using Reflect.apply and not using
is_reused_symbol, but rather just checking whether any
items are present in the list prior to calling alloc.
PR-URL: https://github.com/nodejs/node/pull/27021
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-11 05:40:59 +02:00
Ruben Bridgewater
f86f5736da
benchmark,lib: change var to const
...
Refs: https://github.com/nodejs/node/pull/26679
PR-URL: https://github.com/nodejs/node/pull/26915
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-30 13:16:39 +01:00
Ruben Bridgewater
b08a867d60
benchmark,doc,lib: capitalize more comments
...
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2019-03-27 17:20:06 +01:00
James M Snell
f9ddbb6b2f
lib: move DTRACE_* probes out of global scope
...
The DTRACE_* probes have been global for no really good reason.
Move those into an internalBinding.
PR-URL: https://github.com/nodejs/node/pull/26541
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-12 14:19:36 +00:00
ZYSzys
4c4e4f4bda
http: reduce usage of public util
...
PR-URL: https://github.com/nodejs/node/pull/26548
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-12 06:40:57 +01:00
Anna Henningsen
560466c773
lib,src: remove usage of _externalStream
...
Since 4697e1b0d7 , it is no longer
necessary to use `v8::External`s to pass `StreamBase` instances
to native functions.
PR-URL: https://github.com/nodejs/node/pull/26510
Refs: https://github.com/nodejs/node/pull/25142
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-11 09:32:40 +01:00
Ruben Bridgewater
f8763bb077
benchmark,doc,lib,test: capitalize comments
...
PR-URL: https://github.com/nodejs/node/pull/26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-10 00:44:40 +01:00
Yann Hamon
c957b05177
http: send connection: close when closing conn
...
HTTP/1.1 mandates connections which do not support keep-alive and
close the connection send the connection: close header, see
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10
This page also provides more information:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection
I understand that HTTP/1.1 defaults to keep-alive - and that the
Connection: close header is required when closing a connection.
This adds the Connection: close header in the 400 and 414
responses sent on client errors.
PR-URL: https://github.com/nodejs/node/pull/26467
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-09 00:23:48 +01:00
gengjiawen
0fa11654c7
http: remove unused variable in _http_server.js
...
PR-URL: https://github.com/nodejs/node/pull/26407
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-07 06:18:43 +01:00
Matteo Collina
3c83f93437
http: check for existance in resetHeadersTimeoutOnReqEnd
...
socket.parser can be undefined under unknown circumstances.
This is a fix for a bug I cannot reproduce but it is affecting
people.
Fixes: https://github.com/nodejs/node/issues/26366
PR-URL: https://github.com/nodejs/node/pull/26402
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-06 14:32:39 +00:00
Matteo Collina
667b31be95
http: prevent slowloris with keepalive connections
...
Fixes: https://github.com/nodejs-private/security/issues/214
PR-URL: https://github.com/nodejs-private/node-private/pull/158
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-02-28 22:27:30 +11:00
Mark S. Everitt
f93df51155
http: makes response.writeHead return the response
...
Fixes: https://github.com/nodejs/node/issues/25935
PR-URL: https://github.com/nodejs/node/pull/25974
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-02-09 16:34:09 +01:00
Rich Trott
62942e9ad7
lib: replace 'assert' with 'internal/assert' for many built-ins
...
Replace large 'assert' module with tiny 'internal/assert' module for
many built-in uses.
PR-URL: https://github.com/nodejs/node/pull/25956
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-02-08 00:01:12 -08:00
Luigi Pinca
cc5de5a5cc
http: remove redundant call to socket.setTimeout()
...
`Socket.prototype.setTimeout()` clears the previous timer before setting
a new one.
Refs: https://github.com/nodejs/node/pull/25748#discussion_r253393234
PR-URL: https://github.com/nodejs/node/pull/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 >
2019-02-06 19:38:11 +01:00
Albert Still
bcf2886a84
http: return HTTP 431 on HPE_HEADER_OVERFLOW error
...
Instead of returning a generic 400 response when the
max header size is reached, return a 431 Request Header
Fields Too Large.
This is a semver-major because it changes the HTTP
status code for requests that trigger the header
overflow error.
PR-URL: https://github.com/nodejs/node/pull/25605
Fixes: https://github.com/nodejs/node/issues/25528
Refs: https://tools.ietf.org/html/rfc6585#section-5
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-01 19:48:23 +01:00
cjihrig
5571c0ddeb
http: reuse noop function in socketOnError()
...
PR-URL: https://github.com/nodejs/node/pull/25566
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-01-20 15:38:14 -05:00
Ruben Bridgewater
d4c91f2814
lib: remove internal util._extends() usage
...
This removes all internal calls to the deprecated `_extends()`
function. It is slower than `Object.assign()` and the object spread
notation since V8 6.8 and using the spread notation often also
results in shorter code.
PR-URL: https://github.com/nodejs/node/pull/25105
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-12-20 13:52:44 +01:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
...
This activates the eslint capitalize comment rule for comments
above 50 characters.
PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-17 17:14:35 +01:00
Ruben Bridgewater
1f85ea979c
tools: capitalize sentences
...
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.
PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-12-10 17:07:18 +01:00
Anna Henningsen
aa943d098e
http: make parser choice a runtime flag
...
Add a `--http-parser=llhttp` vs `--http-parser=traditional`
command line switch, to make testing and comparing the new
llhttp-based implementation easier.
PR-URL: https://github.com/nodejs/node/pull/24739
Refs: https://github.com/nodejs/node/issues/24730
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-12-06 05:21:36 +01:00
Ruben Bridgewater
59257543c3
lib: use ES6 class inheritance style
...
PR-URL: https://github.com/nodejs/node/pull/24755
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-12-05 16:55:00 +01:00
Ruben Bridgewater
dcc82b37b6
lib: remove inherits() usage
...
This switches all `util.inherits()` calls to use
`Object.setPrototypeOf()` instead. In fact, `util.inherits()` is
mainly a small wrapper around exactly this function while adding
the `_super` property on the object as well.
Refs: #24395
PR-URL: https://github.com/nodejs/node/pull/24755
Refs: https://github.com/nodejs/node/issues/24395
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-12-05 16:53:58 +01:00
Luigi Pinca
ff7d053ae6
http: destroy the socket on parse error
...
Destroy the socket if the `'clientError'` event is emitted and there is
no listener for it.
Fixes: https://github.com/nodejs/node/issues/24586
PR-URL: https://github.com/nodejs/node/pull/24757
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-12-03 18:02:40 -08:00
Matteo Collina
ee618a7ab2
http,https: protect against slow headers attack
...
CVE-2018-12122
An attacker can send a char/s within headers and exahust the resources
(file descriptors) of a system even with a tight max header length
protection. This PR destroys a socket if it has not received the headers
in 40s.
PR-URL: https://github.com/nodejs-private/node-private/pull/144
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-28 11:36:34 +11:00
szabolcsit
f3b49cfa7b
http: else case is not reachable
...
While checking the arguments passed to http.Server, the case where
the options argument was of wrong type was not handled. Now it
throws an ERR_INVALID_ARG_TYPE error if the options argument is
not a function, object, null, or undefined.
PR-URL: https://github.com/nodejs/node/pull/24176
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-11-14 18:21:56 -08:00
Bastian Krol
eb9748d222
async_hooks: add missing async_hooks destroys in AsyncReset
...
This adds missing async_hooks destroy calls for sockets (in
_http_agent.js) and HTTP parsers. We need to emit a destroy in
AsyncWrap#AsyncReset before assigning a new async_id when the instance
has already been in use and is being recycled, because in that case, we
have already emitted an init for the "old" async_id.
This also removes a duplicated init call for HTTP parser: Each time a
new parser was created, AsyncReset was being called via the C++ Parser
class constructor (super constructor AsyncWrap) and also via
Parser::Reinitialize.
PR-URL: https://github.com/nodejs/node/pull/23272
Fixes: https://github.com/nodejs/node/issues/19859
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-10 08:45:56 +02:00
Gus Caplan
e7f710c1d4
bootstrapper: move internalBinding to NativeModule
...
internalBinding is used so often that it should just automatically be
available for usage in internals.
PR-URL: https://github.com/nodejs/node/pull/23025
Refs: https://github.com/nodejs/node/commit/2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-10-04 11:55:34 +02:00
James M Snell
9d71e6a607
src: deprecate global COUNTER_* and remove perfctr
...
To support Performance Counters on Windows, a number of
global `COUNTER_` methods were added that are undocumented
and really only intended to be used internally by Node.js.
Unfortunately, the perfctr support apparently hasn't even
worked for quite a while and no one has even complained.
This removes the perfctr support and replaces the global
functions with deprecated non-ops for now, with the intent
of removing those outright in the next major release cycle.
PR-URL: https://github.com/nodejs/node/pull/22485
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: João Reis <reis@janeasystems.com >
2018-09-19 11:07:01 +02:00
James M Snell
1744205ff5
http: move process.binding('http_parser') to internalBinding
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22329
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-18 13:01:21 -07:00
Robert Nagy
8ce20aff2d
http: fix res emit close before user finish
...
PR-URL: https://github.com/nodejs/node/pull/20941
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-24 13:23:57 -04:00
я котик пур-пур
464852b1c6
http: fix capitalization of 418 status message
...
Update the message to be consistent with RFC 7168. Add a note to
"Multiple Choices" regarding RFC 7231 superseding RFC 7168.
PR-URL: https://github.com/nodejs/node/pull/20700
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >t
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
2018-05-22 12:20:21 +04:00
Robert Nagy
f22c7c10ca
http: always emit close on req and res
...
PR-URL: https://github.com/nodejs/node/pull/20611
Fixes: https://github.com/nodejs/node/issues/20600
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-13 16:23:50 -07:00
Robert Nagy
d5e363b77e
http: added aborted property to request
...
PR-URL: https://github.com/nodejs/node/pull/20094
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-04-26 19:38:27 +02:00
Anatoli Papirovski
54e112dd61
http: remove duplicate parser unset
...
freeParser already unsets parser property of socket if socket is passed
in specifically. There's no need to do this twice.
PR-URL: https://github.com/nodejs/node/pull/20126
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-04-23 15:59:28 +02:00