[pmwiki-devel] Problem with Hg...

Patrick R. Michaud pmichaud at pobox.com
Sun Mar 18 10:46:16 CDT 2007


On Sun, Mar 18, 2007 at 04:06:04PM +0100, Dominique Faure wrote:
> On 3/18/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> [...]
> >
> >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.
> 
> A generic solution?
> 
> http://pmichaud.com/pipermail/pmwiki-users/2007-January/037813.html

I thought of this, but Dan's post made me think that this
must not be the generic solution we hoped it was.  (To save
readers the trouble, the solution suggested in the above message
is to make sure that 404 pages always generate at least 512 bytes
of output.)

But the message above is referring to the output of PmWiki's
Abort() function, which does often produce output of less than
512 characters.  However, Dan's post in this thread said:

   : 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.

I assumed here, possibly incorrectly, that the 404 error that
Dan was seeing was being generated from HandleBrowse() and not
Abort().  The fix I suggested using $PageNotFoundHeaderFmt
was definitely with this assumption in mind, and Dan confirmed
(off-list) that setting $PageNotFoundHeaderFmt solved the
issue for him.

So, given that the 404 error is coming from HandleBrowse(), 
getting Abort() to generate at least 512 bytes of output wouldn't
have resolved the problem in this case.  And then we're left
with the question of "how do we make sure that HandleBrowse
always produces at least 512 bytes of output?"

But I think that HandleBrowse must nearly always be producing
at least 512 bytes of output, because its output is skinned.
Using the pmwiki skin as an example, 512 characters of output
gets only as far as the '.indent' CSS definition in the <head>.
Or, if counting from the <body> tag, 512 characters barely makes
it to the searchbox.

So, it seemed to me that this was evidence that IE must be
substituting the "friendly error message" even when there's
at least 512 bytes of output.  

But as I said before, I could be very mistaken on this 
assumption.  It would really be helpful to know the size 
of the output that Dan's setup generates when following
a link to a non-existent page.  If it's at least 512
characters long, then we know that there's more to the story
than simply generating 512 bytes of output.

Thanks!

Pm



More information about the pmwiki-devel mailing list