dv-browser 3.0.0 → 3.1.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.
Files changed (2) hide show
  1. package/index.js +5 -2
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -21,6 +21,7 @@ let DvBrowser = function (_config) {
21
21
  authBasic: null,
22
22
  authBearer: null,
23
23
  noDeflate: false,
24
+ lowSpeedTimeout: 15,
24
25
  }, _config);
25
26
 
26
27
  const cookiejar = new CookieJar(null);
@@ -120,8 +121,10 @@ let DvBrowser = function (_config) {
120
121
  curl.setOpt(Curl.option.URL, options.url);
121
122
  curl.setOpt(Curl.option.TIMEOUT, options.timeout);
122
123
  curl.setOpt(Curl.option.CONNECTTIMEOUT, options.connectTimeout);
123
- curl.setOpt(Curl.option.LOW_SPEED_TIME, options.timeout);
124
- curl.setOpt(Curl.option.LOW_SPEED_LIMIT, 512);
124
+ if (options.lowSpeedTimeout) {
125
+ curl.setOpt(Curl.option.LOW_SPEED_TIME, options.lowSpeedTimeout);
126
+ curl.setOpt(Curl.option.LOW_SPEED_LIMIT, 512);
127
+ }
125
128
  curl.setOpt(Curl.option.NOPROGRESS, true);
126
129
  curl.setOpt(Curl.option.HTTPHEADER, headers);
127
130
  // curl.setOpt(Curl.option.VERBOSE, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dv-browser",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "homepage": "https://github.com/druidvav/node-browser",
19
19
  "dependencies": {
20
- "node-libcurl": "3.0.0",
20
+ "node-libcurl": "4.0.0",
21
21
  "tough-cookie": "4.1.3"
22
22
  }
23
23
  }