GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make `clientError` overridable by indutny · Pull Request #4557 · nodejs/node

Conversation

@indutny

@indutny indutny commented Jan 6, 2016

Copy link
Copy Markdown
Member

See: #4543

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
indutny added 2 commits January 6, 2016 16:59
@indutny
tls: rename clientError to tlsClientError
0f65247
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.
@indutny
http: overridable clientError
9fc35f4
Make default `clientError` behavior (close socket immediately)
overridable. With this APIs it is possible to write a custom error
handler, and to send, for example, a 400 HTTP response.

    http.createServer(...).on('clientError', function(err, socket) {
      socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
      socket.destroy();
    });

Fix: nodejs#4543
@indutny

indutny commented Jan 6, 2016

Copy link
Copy Markdown
Member Author

cc @nodejs/http

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny indutny mentioned this pull request Jan 6, 2016
Malformed HTTP request causes connection drop #4543
Closed
mscdex
mscdex reviewed Jan 6, 2016
View reviewed changes
Comment thread doc/api/http.markdown Outdated

@mscdex mscdex Jan 6, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps: "Default behavior is to destroy the socket immediately."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@triblondon triblondon Jan 6, 2016

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For people searching the page, mentioning "malformed request" or "invalid HTTP" would be helpful.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@indutny indutny Jan 6, 2016

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mscdex mscdex added tls Issues and PRs related to the tls subsystem. http Issues and PRs related to the http subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. labels Jan 6, 2016
@vkurchatkin vkurchatkin removed http Issues and PRs related to the http subsystem. tls Issues and PRs related to the tls subsystem. labels Jan 6, 2016
@mscdex mscdex added tls Issues and PRs related to the tls subsystem. http Issues and PRs related to the http subsystem. labels Jan 6, 2016
@vkurchatkin vkurchatkin added tls Issues and PRs related to the tls subsystem. and removed tls Issues and PRs related to the tls subsystem. labels Jan 6, 2016
@Trott

Trott commented Jan 6, 2016

Copy link
Copy Markdown
Member

Should there be a test that triggers clientError with and without the override to confirm both more-or-less basically work as expected? Or is the idea that the modified TLS tests already check the override and other existing tests already check the basic behavior?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny
doc: http fixes
3967df7
@indutny

indutny commented Jan 6, 2016

Copy link
Copy Markdown
Member Author

@Trott yep, I will write a test. Thank you for suggestion

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

indutny added 2 commits January 7, 2016 03:06
@indutny
http: test and fixes
5515479
@indutny
https: fixes
2ba3898
@indutny

indutny commented Jan 7, 2016

Copy link
Copy Markdown
Member Author

@Trott how about this? ;)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented Jan 7, 2016

Copy link
Copy Markdown
Member Author

@mscdex PTAL

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented Jan 7, 2016

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-pull-request/1158/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex

mscdex commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

LGTM if CI is ok with it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented Jan 7, 2016

Copy link
Copy Markdown
Member Author

Landed in 1ab6b21 and 5f76b24, thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

indutny added a commit that referenced this pull request Jan 7, 2016
@indutny
tls: rename clientError to tlsClientError
1ab6b21
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.

PR-URL: #4557
Reviewed-By: Brian White <[email protected]>
indutny added a commit that referenced this pull request Jan 7, 2016
@indutny
http: overridable clientError
5f76b24
Make default `clientError` behavior (close socket immediately)
overridable. With this APIs it is possible to write a custom error
handler, and to send, for example, a 400 HTTP response.

    http.createServer(...).on('clientError', function(err, socket) {
      socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
      socket.destroy();
    });

Fix: #4543
PR-URL: #4557
Reviewed-By: Brian White <[email protected]>
@indutny indutny closed this Jan 7, 2016
@indutny
indutny deleted the fix/gh-4543 branch January 7, 2016 08:39
This was referenced Dec 7, 2023
[Snyk] Fix for 1 vulnerabilities aliscco/alisco-node#1140
Open
[Snyk] Security upgrade mocha from 6.1.4 to 8.3.0 aliscco/alisco-node#1142
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1143
Open
@leonardoadame leonardoadame mentioned this pull request Dec 7, 2023
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 leonardoadame/node#562
Open
This was referenced Dec 7, 2023
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1144
Open
[Snyk] Security upgrade mocha from 6.2.0 to 8.3.0 aliscco/alisco-node#1145
Open
This was referenced Dec 7, 2023
[Snyk] Security upgrade mocha from 7.1.1 to 8.3.0 leonardoadame/node#563
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 leonardoadame/node#566
Open
@baby636 baby636 mentioned this pull request Dec 7, 2023
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 baby636/node#120
Open
This was referenced Dec 7, 2023
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1147
Open
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 aliscco/alisco-node#1148
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1149
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1150
Open
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 aliscco/alisco-node#1151
Open
[Snyk] Security upgrade mocha from 6.2.0 to 8.3.0 aliscco/alisco-node#1152
Open
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 aliscco/alisco-node#1153
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1154
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1155
Open
This was referenced Dec 8, 2023
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#567
Open
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 leonardoadame/node#569
Open
@aliscco aliscco mentioned this pull request Dec 8, 2023
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 aliscco/alisco-node#1157
Open
This was referenced Dec 8, 2023
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 leonardoadame/node#570
Open
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 leonardoadame/node#571
Open
@aliscco aliscco mentioned this pull request Dec 8, 2023
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 aliscco/alisco-node#1160
Open
@leonardoadame leonardoadame mentioned this pull request Dec 8, 2023
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 leonardoadame/node#572
Open
This was referenced Dec 8, 2023
[Snyk] Security upgrade mocha from 7.2.0 to 8.3.0 aliscco/alisco-node#1162
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1163
Open
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 aliscco/alisco-node#1164
Open
@adamlaska adamlaska mentioned this pull request Dec 8, 2023
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 adamlaska/node#134
Open
@leonardoadame leonardoadame mentioned this pull request Dec 8, 2023
[Snyk] Security upgrade mocha from 6.2.3 to 8.3.0 leonardoadame/node#574
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

http Issues and PRs related to the http subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@indutny @Trott @mscdex @triblondon @vkurchatkin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.