[Chicago] How do you troubleshoot cgi errors?

David Rock david at graniteweb.com
Mon Jul 23 19:29:05 CEST 2007

* Atul Varma <varmaa at gmail.com> [2007-07-23 10:07]:
> I think Ian's solution should work fine for you... To clarify, though,
> I believe that the content your CGI application is generating is
> actually not being sent to your browser because the HTTP headers it's
> sending are malformed (i.e., the problem isn't that your browser won't
> show you some content).  The error is occurring between the web server
> and your CGI application, not between your browser and the server, or
> within your browser.
> For instance, normally a CGI application will print content like this
> to the web server (which the web server passes on to the client):
> --
> Content-Type: text/html
> <p>hello!</p>
> --
> The section at the top that's separated from the HTML is actually part
> of the HTTP/CGI protocol, not the HTML standard, and it's that part
> that your application is somehow not transmitting properly to the web
> server.  The web server is looking at those headers and trying to make
> sure they're kosher, but they're not, so it's raising an error.
> As long as you get those headers right, though, everything else will
> be sent to your web browser and you can debug it from there.
> I hope this helps shed some light on things... It's morning and I'm
> not quite thinking straight, so I'm not sure how much sense this
> makes.  Let me know if you need any more help.

Yeah, I think I get it.  I may not have been all that clear, either.  My
gut thought is that it's just totally getting chewed up for some reason
and producing garbage that never leaves the server, so I think that is
similar to what you are saying.  

Thanks for the input.  Every little bit helps. :-)

David Rock
david at graniteweb.com

More information about the Chicago mailing list