FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

http: remove CRLF variable by shfshanyue · Pull Request #40101 · nodejs/node · GitHub

/ node Public

http: remove CRLF variable - #40101

Closed
shfshanyue wants to merge 1 commit into
nodejs:masterfrom
shfshanyue:master
Closed

http: remove CRLF variable#40101
shfshanyue wants to merge 1 commit into
nodejs:masterfrom
shfshanyue:master

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

nodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Sep 14, 2021

Trott commented Sep 14, 2021

Copy link
Copy Markdown
Member

Welcome, @shfshanyue, and thanks for the pull request.

I don't feel terribly strongly about this, but I'm not convinced CRLF is better than \r\n. To me at least, \r\n is explicit and clear. CRLF seems to be a variable-for-a-variable's sake and not significantly easier to understand. It's possible that I'm missing a nuance here, but I wonder if it wouldn't be better to go the other way and change all the usage of CRLF to \r\n. But I'll leave that up to the @nodejs/http folks. I'm happy to defer to others on something like this.

mscdex commented Sep 14, 2021

Copy link
Copy Markdown
Contributor

FWIW I'm not particularly fond of having a CRLF string variable either. It'd be better to just include the literal value where needed.

Copy link
Copy Markdown
Contributor Author

I think it would be better if change all the usage of CRLF to \r\n... I'll replace CRLF with \r\n and remove variable CRLF if necessary.

Copy link
Copy Markdown
Member

I prefer an explicit \r\n as well

shfshanyue changed the title http: replace \r\n with CRLF http: remove CRLF variable Sep 14, 2021
shfshanyue force-pushed the master branch 2 times, most recently from a624067 to e63733b Compare September 14, 2021 12:35

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

mhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Ayase-252 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 14, 2021
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2021

This comment has been minimized.

lpinca commented Sep 14, 2021

Copy link
Copy Markdown
Member

No objections, but please do not change it again after this lands. Refs: f4d3d12

Comment thread lib/_http_common.js Outdated

Copy link
Copy Markdown
Collaborator

VoltrexKeyva removed the needs-ci PRs that need a full CI run. label Sep 16, 2021
mhdawson pushed a commit that referenced this pull request Sep 16, 2021
PR-URL: #40101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>

Copy link
Copy Markdown
Member

Landed in e9fc678

BethGriggs pushed a commit that referenced this pull request Sep 21, 2021
PR-URL: #40101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs pushed a commit that referenced this pull request Sep 21, 2021
PR-URL: #40101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs mentioned this pull request Sep 21, 2021
1 task
karan-lrn added a commit to karan-lrn/node that referenced this pull request Mar 27, 2026
The CRLF constant exported from '_http_common' is deprecated (DEP0206).
Users should use the string '\r\n' directly instead.

This addresses the TODO comment added in nodejs#40101.

PR-URL: https://github.com/nodejs/node/pull/XXXXX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. http Issues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL