On Sat, Jan 06, 2007 at 01:03:00AM +0100, Roman wrote: > >So, I guess I don't have a good answer for getting an invalid > >pagename to return Site.InvalidPage, at least not without > >drastically reworking the page resolution sequence. I can > >at least get it to return a 404 status code without much difficulty, > >instead of the 200 it's returning now. > > Hmm, returning Site.InvalidPage seems to be too much work for such > marginal problem. I think that returning 404 status code would be > sufficient. Additionaly, you could consider changing of the error > message to customizable XLPage string.
Now done for pmwiki-2.2.0-beta20. An invalid pagename returns a "404 Not Found" status code, and the messages are customizable XLPage strings. See the results at http://www.pmwiki.org/wiki/a/b/c (an invalid page name). I also thought about adjusting PmWiki's Abort() function to return other status codes for other abort conditions. For example, if PmWiki is unable to access the .flock file, it could respond with "500 Internal Server Error" as the HTTP status code instead of "200 OK" as it does now. But ultimately I've decided against this, because when Internet Explorer or IIS receive error status codes they often replace the '?cannot acquire lockfile' message that PmWiki provides with a "friendly" error message that doesn't provide any indication of the source of the problem. So, using the standard error responses would greatly hinder site administrators that are trying to troubleshoot PmWiki installations using IE or IIS. For example, here's what IE displays for the same error message from PmWiki, where only the status code is being changed: # PmWiki error using '200 OK' status code http://www.pmwiki.org/pmwiki/uploads/PITS/ie-200.gif # Same error message using '500 Internal Server Error' status code http://www.pmwiki.org/pmwiki/uploads/PITS/ie-500.gif I think it's pretty clear that the first error message is far more useful to an administrator than the second, so I'm going to leave the default for all other abort errors as "200 OK". Thanks to everyone for the helpful comments! Pm _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
