A simple
Google Search came up with
this. According to this, that message appears when your headers are too large (over 8k). It also can happen when your request times out.
And relatively unrelated to your problem: please check out
HTML::Template. It'll really help you maintain all the html embedded in your code...
[ ar0n ]