I got this to work by setting
res.setContentType("text/plain")
then using the redirect to my url.
My url was to a perl script that was
loaded with parameters, worked ok
behind the firewall
The perl script output an html page
and I sent the html header out in the
perl script