From 364cc4e14a7c6b7946f7f759f7917f71a5013fab Mon Sep 17 00:00:00 2001 From: sacru2red Date: Fri, 25 Oct 2024 17:28:18 +0900 Subject: [PATCH] not set Header.Connection if forever option is falsy --- src/http.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.ts b/src/http.ts index 0ad8431e..59745178 100644 --- a/src/http.ts +++ b/src/http.ts @@ -61,7 +61,7 @@ export class HttpClient implements IHttpClient { 'Accept': 'text/html,application/xhtml+xml,application/xml,text/xml;q=0.9,*/*;q=0.8', 'Accept-Encoding': 'none', 'Accept-Charset': 'utf-8', - 'Connection': exoptions.forever ? 'keep-alive' : 'close', + 'Connection': exoptions.forever ? 'keep-alive' : null, 'Host': host + (isNaN(port) ? '' : ':' + port), }; const mergeOptions = ['headers'];