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 — lib: replace string concatenation with template · nodejs/node@df18174

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _http_server.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_http_server.js‎

Copy file name to clipboardExpand all lines: lib/_http_server.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ ServerResponse.prototype.detachSocket = function detachSocket(socket) {
176176
};
177177

178178
ServerResponse.prototype.writeContinue = function writeContinue(cb) {
179-
this._writeRaw('HTTP/1.1 100 Continue' + CRLF + CRLF, 'ascii', cb);
179+
this._writeRaw(`HTTP/1.1 100 Continue${CRLF}${CRLF}`, 'ascii', cb);
180180
this._sent100 = true;
181181
};
182182

@@ -230,7 +230,7 @@ function writeHead(statusCode, reason, obj) {
230230
if (checkInvalidHeaderChar(this.statusMessage))
231231
throw new errors.Error('ERR_INVALID_CHAR', 'statusMessage');
232232

233-
var statusLine = 'HTTP/1.1 ' + statusCode + ' ' + this.statusMessage + CRLF;
233+
var statusLine = `HTTP/1.1 ${statusCode} ${this.statusMessage}${CRLF}`;
234234

235235
if (statusCode === 204 || statusCode === 304 ||
236236
(statusCode >= 100 && statusCode <= 199)) {
@@ -456,7 +456,7 @@ function onParserExecute(server, socket, parser, state, ret, d) {
456456
}
457457

458458
const badRequestResponse = Buffer.from(
459-
'HTTP/1.1 400 ' + STATUS_CODES[400] + CRLF + CRLF, 'ascii'
459+
`HTTP/1.1 400 ${STATUS_CODES[400]}${CRLF}${CRLF}`, 'ascii'
460460
);
461461
function socketOnError(e) {
462462
// Ignore further errors

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.