You don't give us much clue as to what xmi2pl/1 does. I don't think
there are any flags involved. What is critical though is that you
cannot write to current_output and you must make sure that you do
not mess around with this stream. Within the handler, current_output
is bound to a special wrapped stream that handles the replied CGI
header, encoding, chunking, etc.
Hope that gives you a hint.
Cheers --- Jan