Mark James wrote:
I'm having CGI redirect problems mp2 (cvs).

Instead of being redirected to the proper web page, I'm sometimes
getting a "302 Moved" page containing a link to the correct URL.

Damn this was a hard bug to track down.


The cause of the problem was my perl code calling flush.pl and
flushing STDOUT at a point prior to it printing the response headers.
Under mp2, flushing STDOUT calls mpxs_output_flush in
xs/Apache/RequestIO/Apache__RequestIO.h, which in turn calls
ap_rflush, which triggers creation of the HTTP header, which
at this stage, prior to my script printing its 302 header,
uses a 200 OK status.  So instead of a proper redirect
being sent back to the browser, a normal web page with an
embedded 302 link is sent.

Everything seems to work if the ap_rflush call is removed
from mpxs_output_flush, but I don't know if this is the
proper way to fix it.

Mark



Reply via email to