mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Remove "Connection: keep-alive" workaround from domain-task, as it's not needed with .NET Core >= 1.1.0. Fixes #655
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "domain-task",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"description": "Tracks outstanding operations for a logical thread of execution",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -25,15 +25,6 @@ function issueRequest(baseUrl: string, req: string | Request, init?: RequestInit
|
||||
`);
|
||||
}
|
||||
|
||||
// Currently, some part of ASP.NET (perhaps just Kestrel on Mac - unconfirmed) doesn't complete
|
||||
// its responses if we send 'Connection: close', which is the default. So if no 'Connection' header
|
||||
// has been specified explicitly, use 'Connection: keep-alive'.
|
||||
init = init || {};
|
||||
init.headers = init.headers || {};
|
||||
if (!init.headers['Connection']) {
|
||||
init.headers['Connection'] = 'keep-alive';
|
||||
}
|
||||
|
||||
return isomorphicFetch(req, init);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user