CGI and find
Alex Rice
alex at mindlube.com
Tue Sep 2 12:50:01 EDT 2003
On Tuesday, September 2, 2003, at 11:10 AM, J. Landman Gay wrote:
> When I run this "find" script as a cgi, I get a "malformed header"
> error in the system log:
>
> malformed header from script. Bad header=0 0:
> /Library/WebServer/CGI-Executables/search.mt
>
> Why would a header be "malformed" in the second case and not in the
> first? What difference would it make how the content was collected?
> Every other part of both scripts is identical.
>
> What header should I use?
I can't help with the Find question, but re: malformed header or 500
server error messages. I've done a lot of CGI programming and almost
always what this means is the script is sending content *before* the
http headers are sent. Try moving your "Content-type:" header to
immediately after the script starts executing. Don't leave it to the
very end. Then you can see any other output your script is sending by
mistake, because it will be sent to the browser.
You can probably skip the Content-length header. Most web servers are
flexible in that regard.
Alex Rice <alex at mindlube.com> | Mindlube Software | http://mindlube.com
what a waste of thumbs that are opposable
to make machines that are disposable -Ani DiFranco
More information about the use-livecode
mailing list