@artilleryio/int-core 2.0.10-533da4b → 2.0.10-7871d39
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.
- package/lib/engine_http.js +5 -19
- package/package.json +2 -2
package/lib/engine_http.js
CHANGED
|
@@ -85,10 +85,6 @@ function HttpEngine(script) {
|
|
|
85
85
|
this.config.http = {};
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
if (typeof this.config.http.defaults === 'undefined') {
|
|
89
|
-
this.config.http.defaults = {};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
88
|
if (typeof this.config.http.cookieJarOptions === 'undefined') {
|
|
93
89
|
this.config.http.cookieJarOptions = {};
|
|
94
90
|
}
|
|
@@ -201,10 +197,7 @@ HttpEngine.prototype.step = function step(requestSpec, ee, opts) {
|
|
|
201
197
|
}
|
|
202
198
|
|
|
203
199
|
if (typeof requestSpec.think !== 'undefined') {
|
|
204
|
-
return engineUtil.createThink(
|
|
205
|
-
requestSpec,
|
|
206
|
-
self.config.http.defaults.think || self.config.defaults.think
|
|
207
|
-
);
|
|
200
|
+
return engineUtil.createThink(requestSpec, self.config.defaults.think);
|
|
208
201
|
}
|
|
209
202
|
|
|
210
203
|
if (typeof requestSpec.log !== 'undefined') {
|
|
@@ -394,8 +387,7 @@ HttpEngine.prototype.step = function step(requestSpec, ee, opts) {
|
|
|
394
387
|
|
|
395
388
|
// Assign default headers then overwrite as needed
|
|
396
389
|
let defaultHeaders = lowcaseKeys(
|
|
397
|
-
config.
|
|
398
|
-
config.defaults.headers || { 'user-agent': USER_AGENT }
|
|
390
|
+
config.defaults.headers || { 'user-agent': USER_AGENT }
|
|
399
391
|
);
|
|
400
392
|
const combinedHeaders = _.extend(
|
|
401
393
|
defaultHeaders,
|
|
@@ -819,9 +811,7 @@ function lastRequest(res, requestParams) {
|
|
|
819
811
|
HttpEngine.prototype.setInitialContext = function (initialContext) {
|
|
820
812
|
initialContext._successCount = 0;
|
|
821
813
|
|
|
822
|
-
initialContext._defaultStrictCapture =
|
|
823
|
-
this.config.http.defaults.strictCapture ||
|
|
824
|
-
this.config.defaults.strictCapture;
|
|
814
|
+
initialContext._defaultStrictCapture = this.config.defaults.strictCapture;
|
|
825
815
|
initialContext._jar = new tough.CookieJar(
|
|
826
816
|
null,
|
|
827
817
|
this.config.http.cookieJarOptions
|
|
@@ -829,12 +819,8 @@ HttpEngine.prototype.setInitialContext = function (initialContext) {
|
|
|
829
819
|
|
|
830
820
|
initialContext._enableCookieJar = false;
|
|
831
821
|
// If a default cookie is set, we will use the jar straightaway:
|
|
832
|
-
if (
|
|
833
|
-
|
|
834
|
-
typeof this.config.defaults.cookie === 'object'
|
|
835
|
-
) {
|
|
836
|
-
initialContext._defaultCookie =
|
|
837
|
-
this.config.http.defaults.cookie || this.config.defaults.cookie;
|
|
822
|
+
if (typeof this.config.defaults.cookie === 'object') {
|
|
823
|
+
initialContext._defaultCookie = this.config.defaults.cookie;
|
|
838
824
|
initialContext._enableCookieJar = true;
|
|
839
825
|
}
|
|
840
826
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artilleryio/int-core",
|
|
3
|
-
"version": "2.0.10-
|
|
3
|
+
"version": "2.0.10-7871d39",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@artilleryio/int-commons": "2.0.0-
|
|
6
|
+
"@artilleryio/int-commons": "2.0.0-7871d39",
|
|
7
7
|
"@artilleryio/sketches-js": "^2.1.1",
|
|
8
8
|
"agentkeepalive": "^4.1.0",
|
|
9
9
|
"arrivals": "^2.1.2",
|