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 — net: use decodeStrings public API for writable stream · nodejs/node@c13e5be

File tree

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

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ function Socket(options) {
255255
options.allowHalfOpen = true;
256256
// For backwards compat do not emit close on destroy.
257257
options.emitClose = false;
258+
// Handle strings directly.
259+
options.decodeStrings = false;
258260
stream.Duplex.call(this, options);
259261

260262
// Default to *not* allowing half open sockets.
@@ -308,9 +310,6 @@ function Socket(options) {
308310
this._pendingData = null;
309311
this._pendingEncoding = '';
310312

311-
// handle strings directly
312-
this._writableState.decodeStrings = false;
313-
314313
// If we have a handle, then start the flow of data into the
315314
// buffer. if not, then this will happen when we connect
316315
if (this._handle && options.readable !== false) {

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.