[pmwiki-users] 404 not found with IE7 only ???

Patrick R. Michaud pmichaud at pobox.com
Sun Mar 2 10:10:13 CST 2008

On Sun, Mar 02, 2008 at 02:16:31PM +0100, Christophe David wrote:
> >>  **intermittent** "404 Not Found" on many pages with Internet Explorer only
> ...
> This works great, and PmWiki processes everything as expected EXCEPT
> that because MyGroup.MyPage does not exist, it returns 404 (pmwiki.php
> line 1517).  This should not be the case in this context, as there is
> a real content generated.
> Internet Explorer seems to take the 404 return code strictly, and does
> not display the content generated by PmWiki, while Firefox and others
> do.
> The workaround is to re-define
> $PageNotFoundHeaderFmt = 'HTTP/1.1 200 OK';


> Should PmWiki be adapted to handle this special case and not retrun
> 404 when some content is returned ?

I think the current behavior is correct.  The browser is requesting
a page, and as far as PmWiki is converned, that page doesn't
exist.  Yes, there may be content generated for the page coming from
other sources, but in every other respect (link generation, pagelists, 
(:if exists ... :), etc.) the page doesn't exist.  

In particular, just because a GroupHeader or GroupFooter exists
shouldn't mean that we want every possible name in the group to
be treated as though it exists.

So, I think the current approach is the correct one -- if the page
doesn't exist, return a 404 Not Found code.  For "pseudo pages"
that should actually be treated as existing even though they don't,
the correct solution is to do a local customization of 
$PageNotFoundHeaderFmt .

There has also been discussion from time to time about having
PmWiki return "200 Ok" whenever it detects that the browser is
running MSIE (e.g., from the User-Agent string).  I don't recall
why I chose not to do that -- perhaps I simply forgot it.  Perhaps
someone can check the archives or remind me....?


More information about the pmwiki-users mailing list