Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

node-digest-auth

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-digest-auth - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+1
-1
package.json
{
"name": "node-digest-auth",
"version": "1.0.2",
"version": "1.0.3",
"description": "Digest Auth Package",

@@ -5,0 +5,0 @@ "main": "dist/digestClient.js",

@@ -27,2 +27,3 @@ import * as crypto from "crypto";

private httpRequest: typeof http | typeof https;
private authenticatedSocket: any | null = null; // Add this line

@@ -52,5 +53,5 @@ constructor(

// Listen for the socket event to capture the underlying socket
let socket: any = null;
let initialSocket: any = null;
req.on("socket", (sock: any) => {
socket = sock;
initialSocket = sock;
});

@@ -66,3 +67,3 @@

request: req,
getSocket: () => socket,
getSocket: () => this.authenticatedSocket || initialSocket, // Prefer the authenticated socket if available
};

@@ -130,2 +131,7 @@ }

// Capture the authenticated socket
req.on("socket", (sock: any) => {
this.authenticatedSocket = sock;
});
if (this.shouldEnd) {

@@ -132,0 +138,0 @@ req.end();