summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-remove-header-stays-removed.js
Commit message (Collapse)AuthorAgeFilesLines
* test: reduce flakiness of test-http-remove-header-stays-removed.jsDebadree Chatterjee2023-03-181-8/+9
| | | | | | Refs: https://github.com/nodejs/reliability/issues/508 Refs: https://github.com/nodejs/node/pull/46333 PR-URL: https://github.com/nodejs/node/pull/46855 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* http: close the connection after sending a body without declared lengthTim Perry2023-02-201-2/+7
| | | | | | | | | | | | | | | | | | | | Previously, if you removed both content-length and transfer-encoding headers, the connection would still be kept-alive by default. This isn't helpful, because without those headers, the only way the client knows when the body is completed is when the connection closes. See https://www.rfc-editor.org/rfc/rfc7230#section-3.3.3 for more details on this message body handling logic (this is case 7). This meant that in effect, if you removed both headers every response came with a 5 second delay at the end (the default KA timeout) before the client could process it. Now, if you remove both headers the connection closes automatically immediately, so the client knows that it has received the whole message body. PR-URL: https://github.com/nodejs/node/pull/46333 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
* doc,lib,test: capitalize comment sentencesRuben Bridgewater2018-12-171-1/+1
| | | | | | | | | | | 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>
* tools: capitalize sentencesRuben Bridgewater2018-12-101-1/+1
| | | | | | | | | | | | 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>
* test: fix assertion arguments orderElian Gutierrez2018-10-221-2/+2
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23787 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* meta: restore original copyright headerJames M Snell2017-03-101-0/+21
| | | | | | | | | | | | | | | A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
* test: s/assert.equal/assert.strictEqual/Gibson Fahnestock2017-01-111-2/+2
| | | | | | | | | | | | | Use assert.strictEqual instead of assert.equal in tests, manually convert types where necessary. PR-URL: https://github.com/nodejs/node/pull/10698 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
* test: use eslint to fix var->const/letGibson Fahnestock2017-01-111-2/+2
| | | | | | | | | Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
* test: use const for all require() callscjihrig2017-01-021-2/+2
| | | | | PR-URL: https://github.com/nodejs/node/pull/10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: use random ports where possibleBrian White2016-06-101-3/+3
| | | | | | | | | | | This helps to prevent issues where a failed test can keep a bound socket open long enough to cause other tests to fail with EADDRINUSE because the same port number is used. PR-URL: https://github.com/nodejs/node/pull/7045 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
* tools: lint for object literal spacingRich Trott2016-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | There has been occasional nits for spacing in object literals in PRs but the project does not lint for it and it is not always handled consistently in the existing code, even on adjacent lines of a file. This change enables a linting rule requiring no space between the key and the colon, and requiring at least one space (but allowing for more so property values can be lined up if desired) between the colon and the value. This appears to be the most common style used in the current code base. Example code the complies with lint rule: myObj = { foo: 'bar' }; Examples that do not comply with the lint rule: myObj = { foo : 'bar' }; myObj = { foo:'bar' }; PR-URL: https://github.com/nodejs/node/pull/6592 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
* test,benchmark: use deepStrictEqual()Rich Trott2016-04-221-1/+1
| | | | | | | | | | | | In preparation for a lint rule that will enforce assert.deepStrictEqual() over assert.deepEqual(), change tests and benchmarks accordingly. For tests and benchmarks that are testing or benchmarking assert.deepEqual() itself, apply a comment to ignore the upcoming rule. PR-URL: https://github.com/nodejs/node/pull/6213 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: enable linting for testsRoman Reiss2015-05-191-0/+1
| | | | | | | | | | | | Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* http: send Content-Length when possibleChristian Tellnes2015-03-051-0/+1
| | | | | | | | | | | | This changes the behavior for http to send send a Content-Length header instead of using chunked encoding when we know the size of the body when sending the headers. Fixes: https://github.com/iojs/io.js/issues/1044 PR-URL: https://github.com/iojs/io.js/pull/1062 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Brian White <mscdex@mscdex.net>
* Remove excessive copyright/license boilerplateisaacs2015-01-121-21/+0
| | | | | | | The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
* test: split test in parallel/sequentialFedor Indutny2014-12-171-0/+59
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139