Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z - Internet FAQ Archives

FAQ: Frequently Asked Questions about CGI Programming
Section - 4.2 I'm having trouble with my headers. What can I do?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Zip codes ]

Top Document: FAQ: Frequently Asked Questions about CGI Programming
Previous Document: 4.1 Are there some interactive debugging tools and services available?
Next Document: 4.3 Why do I get Error 500 ("the script misbehaved", or "Internal Server Error")
See reader questions & answers on this topic! - Help others by sharing your knowledge

For simple cases, examining your response headers "by hand" may suffice:
(1) telnet to the host and port where the server is running - e.g.
        telnet 80
(2) Enter HTTP request.   The most useful for this purpose is usually HEAD; eg
        HEAD /index.html HTTP/1.0
        (optional HTTP headers)
        (followed by a blank line)
Now you'll get a full HTTP response header back.

For complex cases, such as sending a request with headers (as a browser
does) or POSTing a form, this author's free online diagnosis cg-eye is
included in the respective toolkits at
	This combines an offline cgi "linter" with two online services:
	(a) Interactive mode permits you to formulate an HTTP request,
	which is then sent to your server.
	(b) Live mode submits your form, exactly as it gets it from your
	In both cases, it will print a detailed report of the transaction,
	and optionally (if the CGI is producing an HTML page) validate it.

User Contributions:

Comment about this article, ask questions, or add new information about this topic: