Grabbing HTTP Header
Dan Shafer
dan at eclecticity.com
Tue May 6 02:10:00 EDT 2003
This script does not run on my configuration. It gives me the same useless internal server error all other CGIs that don't work give me.
I am really stumped here. I hope someone can lead me out of the wilderness.
>I though the echo.mt cgi has it?
>
>#!/home/mc/mc
># This MetaTalk script loops over all the environment variables
># set by the server when it runs a CGI application printing out
># its name and value.
>on startup
># loop over all of the global variables, getting name and value
> repeat for each item i in the globals
> put i && "=" && value(i) & return after buffer
> end repeat
>
> put "" into tContainer
> if $CONTENT_LENGTH > 0 then
> put $CONTENT_LENGTH into tLen
> put "" into tContainer
> put 0 into tContainerSize
> repeat
> read from stdin until empty
> put it after tContainer
> add length(it) to tContainerSize
> if tContainerSize >= tLen then
> exit repeat
> end if
> end repeat
> end if
>
> #!
> put "Content-Type: text/plain" & cr
> put "Content-Length:" && the length of (buffer & tContainer) & cr & cr
> put buffer & tContainer
>end startup
>
>--
>
>
>_______________________________________________
>metacard mailing list
>metacard at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/metacard
More information about the metacard
mailing list