whistle 2.10.7 → 2.10.8
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/biz/webui/lib/index.js
CHANGED
|
@@ -301,9 +301,10 @@ app.use(function(req, res, next) {
|
|
|
301
301
|
if (referer) {
|
|
302
302
|
var refOpts = parseUrl(referer);
|
|
303
303
|
var pathname = refOpts.pathname;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
304
|
+
var match = PLUGIN_PATH_RE.exec(pathname);
|
|
305
|
+
if (match && match[3]) {
|
|
306
|
+
var name = match[2];
|
|
307
|
+
req.url = '/' + match[1] + '.' + name + path;
|
|
307
308
|
PLUGIN_NAMES.set(path, name);
|
|
308
309
|
} else {
|
|
309
310
|
pluginName = config.getPluginNameByHost(refOpts.hostname);
|
|
@@ -400,9 +401,9 @@ function cgiHandler(req, res) {
|
|
|
400
401
|
var notFound = err ? err.code === 'ENOENT' : !stat.isFile();
|
|
401
402
|
var msg;
|
|
402
403
|
if (config.debugMode) {
|
|
403
|
-
msg = util.THEME_STYLE + '<pre>' + (err ? util.encodeHtml(util.getErrorStack(err)) : 'No such
|
|
404
|
+
msg = util.THEME_STYLE + '<pre>' + (err ? util.encodeHtml(util.getErrorStack(err)) : 'No such file') + '</pre>';
|
|
404
405
|
} else {
|
|
405
|
-
msg = notFound ? 'Not
|
|
406
|
+
msg = notFound ? 'Not found' : 'Internal server error';
|
|
406
407
|
}
|
|
407
408
|
return common.sendRes(res, notFound ? 404 : 500, msg);
|
|
408
409
|
}
|
package/lib/service/composer.js
CHANGED
|
@@ -378,16 +378,15 @@ exports.handleRequest = function(req, res) {
|
|
|
378
378
|
}
|
|
379
379
|
delete headers[config.WEBUI_HEAD];
|
|
380
380
|
headers[config.FROM_COM_HEADER] = '1';
|
|
381
|
-
var isTest = reqBody.isTest;
|
|
382
381
|
var testId;
|
|
383
382
|
var enableProxyRules = reqBody.enableProxyRules !== false && !reqBody.disabledGlobalRules;
|
|
384
383
|
reqBody.enableProxyRules = enableProxyRules;
|
|
385
|
-
if (!enableProxyRules
|
|
384
|
+
if (!enableProxyRules) {
|
|
386
385
|
headers[config.DISABLE_RULES_HEADER] = '1';
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
386
|
+
}
|
|
387
|
+
if (reqBody.isTest) {
|
|
388
|
+
testId = ++testIndex + '';
|
|
389
|
+
headers[config.TEST_HEADER] = testId;
|
|
391
390
|
}
|
|
392
391
|
headers.host = options.host;
|
|
393
392
|
options.clientId = clientId;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "whistle",
|
|
3
3
|
"description": "HTTP, HTTP2, HTTPS, Websocket debugging proxy",
|
|
4
|
-
"version": "2.10.
|
|
4
|
+
"version": "2.10.8",
|
|
5
5
|
"dataDirname": ".whistle",
|
|
6
6
|
"localUIHost": "local.whistlejs.com",
|
|
7
7
|
"port": 8899,
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"url": "https://github.com/avwo/whistle.git"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"adm-zip": "0.
|
|
40
|
+
"adm-zip": "^0.6.0",
|
|
41
41
|
"async-limiter": "2.0.0",
|
|
42
|
-
"body-parser": "^1.20.
|
|
42
|
+
"body-parser": "^1.20.6",
|
|
43
43
|
"colors": "1.1.2",
|
|
44
44
|
"express": "^4.21.2",
|
|
45
45
|
"extend": "^3.0.2",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"lru-cache": "^4.1.1",
|
|
52
52
|
"mime": "^1.6.0",
|
|
53
53
|
"multer2": "^1.1.1",
|
|
54
|
-
"node-forge": "^1.
|
|
54
|
+
"node-forge": "^1.4.0",
|
|
55
55
|
"node-pac": "^0.5.1",
|
|
56
56
|
"parseurl": "^1.3.1",
|
|
57
57
|
"pfork": "^0.6.3",
|