Preparing web server for update to v1.15.4

This commit is contained in:
Jeff Parsons 2014-10-10 17:18:28 -07:00 committed by jeffpar
commit cbafaa309c
8 changed files with 780 additions and 795 deletions

View file

@ -196,28 +196,26 @@ var asExtsNonServed = [
"sh"
];
var asDirsNonServed = [
var asFilesNonServed = [
"README.md",
"Gruntfile.js",
"netlib.js",
"npm-shrinkwrap.json",
"package.json",
"server.js",
"bin",
"debug",
"lib",
"logs",
"makefile",
"my_modules",
"node_modules",
"node.log",
"tests",
"tmp",
"users",
"iisnode" // Azure/IISNode-specific
];
var asFilesNonServed = [
"README.md",
"Gruntfile.js",
"server.js",
"npm-shrinkwrap.json",
"package.json",
"makefile",
"node.log",
"users.log",
"iisnode", // Azure/IISNode-specific
"IISNode.yml", // Azure/IISNode-specific
"web.config" // Azure/IISNode-specific
];
@ -265,7 +263,7 @@ function HTMLOut(sDir, sFile, fRebuild, req, done)
* Note that a production server should not need the GORT_REBUILD command, so we accept
* it only if fServerDebug is true.
*/
if (net.hasParm(net.GORT_COMMAND, net.GORT_REBUILD, req)) {
if (fServerDebug && net.hasParm(net.GORT_COMMAND, net.GORT_REBUILD, req)) {
req.query[net.GORT_COMMAND] = undefined;
this.fRebuild = true;
}
@ -437,20 +435,8 @@ HTMLOut.filter = function(req, res, next)
var sBaseExt = ((i = sBaseName.lastIndexOf('.')) > 0? sBaseName.substr(i+1) : "");
var sTrailingChar = req.path.slice(-1);
if (!fServerDebug && !net.hasParm(net.GORT_COMMAND, net.GORT_DEBUG, this.req)) {
var fNonServed = false;
if (!fServerDebug && !net.hasParm(net.GORT_COMMAND, net.GORT_DEBUG, req)) {
if (asExtsNonServed.indexOf(sBaseExt) >= 0 || asFilesNonServed.indexOf(sBaseName) >= 0) {
fNonServed = true;
} else {
var asDirs = req.path.split('/');
for (i = 0; i < asDirs.length; i++) {
if (asDirsNonServed.indexOf(asDirs[i]) >= 0) {
fNonServed = true;
break;
}
}
}
if (fNonServed) {
/*
* Mimic the error code+message that express.static() displays for non-existent files/folders.
*/
@ -1013,7 +999,6 @@ HTMLOut.prototype.getDirList = function(sToken, sIndent, aParms)
if (sBaseName.indexOf("-debug") > 0) continue;
if (asExtsNonServed.indexOf(sExt) >= 0) continue;
if (asExtsNonListed.indexOf(sExt) >= 0) continue;
if (asDirsNonServed.indexOf(sBaseName) >= 0) continue;
if (asFilesNonServed.indexOf(sBaseName) >= 0) continue;
if (asFilesNonListed.indexOf(sBaseName) >= 0) continue;
} else {

View file

@ -1777,7 +1777,7 @@ ChipSet.prototype.getSWFloppyDrives = function(fInit)
*
* @this {ChipSet}
* @param {number} iDrive (0-based)
* @return {number} one of the ChipSet.FDRIVE values (ie, NONE: 0, DSDD: 1, DSHD: 2)
* @return {number} one of the ChipSet.CMOS.FDRIVE values (ie, NONE: 0, DSDD: 1, DSHD: 2)
*/
ChipSet.prototype.getSWFloppyDriveType = function(iDrive)
{
@ -1785,9 +1785,9 @@ ChipSet.prototype.getSWFloppyDriveType = function(iDrive)
* TODO: For MODEL_5170, we default all floppy drive types to DSHD, but more control would be nice.
*/
if (iDrive < this.getSWFloppyDrives()) {
return (this.model < ChipSet.MODEL_5170? ChipSet.FDRIVE.DSDD : ChipSet.FDRIVE.DSHD);
return (this.model < ChipSet.MODEL_5170? ChipSet.CMOS.FDRIVE.DSDD : ChipSet.CMOS.FDRIVE.DSHD);
}
return ChipSet.FDRIVE.NONE;
return ChipSet.CMOS.FDRIVE.NONE;
};
/**

View file

@ -202,7 +202,7 @@ HDC.aDriveTypes = [
*
* Without the "DUAL" bit set, when it came time later to report the diskette drive type, the "DISK_TYPE" function
* (@F000:273D) would branch to one of two almost-identical blocks of code -- specifically, a block that disallowed
* diskette drive types >= 2 (ChipSet.FDRIVE.DSDD) instead of >= 3 (ChipSet.FDRIVE.DSHD).
* diskette drive types >= 2 (ChipSet.CMOS.FDRIVE.DSDD) instead of >= 3 (ChipSet.CMOS.FDRIVE.DSHD).
*
* In other words, the "Fixed Disk" portion of the HFCOMBO controller has to be present and operational if the user
* wants to use high-capacity (80-track) diskettes with "Diskette Drive" portion of the controller. This may not be