Skip to content

Commit

Permalink
Merge pull request #109 from zowe/staging
Browse files Browse the repository at this point in the history
Update RC with latest fixes
  • Loading branch information
1000TurquoisePogs authored May 31, 2019
2 parents d33d649 + 9f395cf commit 5973bda
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,8 @@ WebApp.prototype = {
switch (service.type) {
case "service":
//installLog.info(`${plugin.identifier}: installing proxy at ${subUrl}`);
router = this.makeProxy(zLuxUrl.makePluginURL(this.options.productCode,
plugin.identifier) +
router = this.makeProxy(service.urlPrefix ?
service.urlPrefix : zLuxUrl.makePluginURL(this.options.productCode, plugin.identifier) +
zLuxUrl.makeServiceSubURL(service, false, true), false,
getAgentProxyOptions(this.options, this.options.serverConfig.agent));
break;
Expand Down
8 changes: 8 additions & 0 deletions plugins/config/doc/swagger/data.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

swagger: '2.0'
info:
description: This service is core to the App server and handles user, group, and administrative preferences for individual plugins
Expand Down
9 changes: 8 additions & 1 deletion plugins/terminal-proxy/lib/terminalProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,14 @@ TerminalWebsocketProxy.prototype.handleWebsocketClosed = function(code, reason)
};

TerminalWebsocketProxy.prototype.handleTerminalClientMessage = function(message, websocket) {
var jsonObject = JSON.parse(message);
let jsonObject;
try {
jsonObject = JSON.parse(message);
} catch (e) {
//not json
this.logger.warn(this.identifierString()+' sent messsage which was not JSON');
this.closeConnection(websocket, WEBSOCKET_REASON_TERMPROXY_INTERNAL_ERROR, 'Message not JSON');
}
this.logger.debug(this.identifierString()+' Websocket client message received. Length='+message.length);
this.logger.log(this.logger.FINER,this.identifierString()+' Websocket client message content='+message);
if (jsonObject) {
Expand Down
10 changes: 10 additions & 0 deletions test/webapp/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/

// start with uncommenting these once a test fails
global.COM_RS_COMMON_LOGGER.setLogLevelForComponentPattern("_zsf.install", 0);
global.COM_RS_COMMON_LOGGER.setLogLevelForComponentPattern("_zsf.utils", 0);
Expand Down

0 comments on commit 5973bda

Please sign in to comment.