master
Dave Winer 7 years ago
parent 11f8371785
commit 36f7fc5970

@ -266,6 +266,10 @@ There will always be more work to do here. ;-)
### Updates
#### v0.74 7/5/17 by DW
If a request comes in for domain.com/hello and it's a directory, redirect to domain.com/hello/.
#### v0.73 6/17/17 by DW
Replaced <a href="https://www.npmjs.com/package/daveopml">daveopml</a> with <a href="https://www.npmjs.com/package/opmltojs">opmltojs</a>, a new package that builds on the <a href="https://github.com/Leonidas-from-XIV/node-xml2js">xml2js</a> package.

@ -1,4 +1,4 @@
var myVersion = "0.73c", myProductName = "PagePark";
var myVersion = "0.74a", myProductName = "PagePark";
/* The MIT License (MIT)
Copyright (c) 2014-2015 Dave Winer
@ -510,11 +510,13 @@ function handleHttpRequest (httpRequest, httpResponse) {
if (!serveRedirect (lowerpath, config)) { //7/30/15 by DW -- it wasn't a redirect
if (stats.isDirectory ()) {
if (!utils.endsWith (f, "/")) {
f += "/";
returnRedirect (httpRequest.url + "/", false); //7/5/17 by DW
}
else {
findSpecificFile (f, pageparkPrefs.indexFilename, function (findex) {
serveFile (findex, config);
});
}
findSpecificFile (f, pageparkPrefs.indexFilename, function (findex) {
serveFile (findex, config);
});
}
else {
serveFile (f, config);

Loading…
Cancel
Save