@comunica/actor-http-fetch 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,7 +14,8 @@ class FetchInitPreprocessor {
|
|
|
14
14
|
}
|
|
15
15
|
init.headers = headers;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
// Only enable keepalive functionality if we are not sending a body (some browsers seem to trip over this)
|
|
18
|
+
return { keepalive: !init.body, ...init };
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
exports.FetchInitPreprocessor = FetchInitPreprocessor;
|
|
@@ -15,7 +15,7 @@ class FetchInitPreprocessor {
|
|
|
15
15
|
}
|
|
16
16
|
handle(init) {
|
|
17
17
|
// Convert body Web stream to Node stream, as node-fetch does not support Web streams
|
|
18
|
-
if (init.body && 'getReader' in init.body) {
|
|
18
|
+
if (init.body && typeof init.body !== 'string' && 'getReader' in init.body) {
|
|
19
19
|
init.body = bus_http_1.ActorHttp.toNodeReadable(init.body);
|
|
20
20
|
}
|
|
21
21
|
return { ...init, agent: this.agent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-http-fetch",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A node-fetch http actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"lib/**/*.js"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@comunica/bus-http": "^2.0
|
|
33
|
-
"@comunica/context-entries": "^2.0
|
|
34
|
-
"@comunica/core": "^2.0
|
|
35
|
-
"@comunica/mediatortype-time": "^2.0
|
|
32
|
+
"@comunica/bus-http": "^2.2.0",
|
|
33
|
+
"@comunica/context-entries": "^2.2.0",
|
|
34
|
+
"@comunica/core": "^2.2.0",
|
|
35
|
+
"@comunica/mediatortype-time": "^2.2.0",
|
|
36
36
|
"cross-fetch": "^3.0.5"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"browser": {
|
|
44
44
|
"./lib/FetchInitPreprocessor.js": "./lib/FetchInitPreprocessor-browser.js"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "00d4108e46250fb94b586bfb8caf5e8b1c704160"
|
|
47
47
|
}
|