in reply to Re^2: Debugging without shell access?
in thread Debugging without shell access?
You're missing the "Content-Type:" header.
...
Without the content-type header, there's no way it's going to work in a CGI environment.
That's not entirely true. His code is perfectly valid ... for HTTP/0.9, running under some webservers. In fact, sending headers would be an error under HTTP/0.9. (current versions of Apache will strip them out for you, so you don't need to detect that case)
I've just re-read the HTTP/1.1 specs, and I can't find any mention of Content-Type being required. The only 'MUST' that I see is for sending Content-Length on a request with a message body. (eg, POST). Even if that were not the case, all headers were optional in previous versions
The following is a perfectly acceptable response, should you give it a useful message body:
HTTP/1.0 200 OK <html> ... </html>
The important factor is the blank line to seperate the headers from the body -- but personally, I'd just stick with using CGI or some other toolkit to generate the appropriate headers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Debugging without shell access?
by Anonymous Monk on Oct 31, 2006 at 09:53 UTC | |
by jhourcle (Prior) on Oct 31, 2006 at 16:04 UTC |