[pmwiki-devel] Problem with Hg...

Patrick R. Michaud pmichaud at pobox.com
Sat Mar 17 23:44:39 CDT 2007


On Sat, Mar 17, 2007 at 10:54:53PM -0400, The Editor wrote:
> I seem to be having a problem with Hg, and I'm not sure how to debug it.
> 
> Basically when the recipe is enabled and I click a link to a page that
> does not exist, I get a 404 error.  When I disable the recipe, it
> shows up as expected in PmWiki.
> ...
> PS.  Oops.  Just noticed it only does it on IE (7) and not on FireFox.
>  This is really strange.

Since it only happens in IE, the problem is likely that IE
shows "friendly error messages" instead of the text of the page 
returned by the webserver.  I've yet to find a reliable way to
get IE to always display the page contents instead of the 
"friendly error message", so the only recourse is to have PmWiki
return an incorrect HTTP Header whenever IE is in use.

Thus:

  if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) 
    $PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';

Actually, since a large number of recipes and customizations seem
to need to be able to detect the presence of an IE browser...
perhaps we should define a core $IsMSIE variable that gets
set to true whenever we detect that Internet Explorer is
being used.  Then the above would simply become:

  if ($IsMSIE) $PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';

Pm



More information about the pmwiki-devel mailing list