Grabbing HTTP Headers
Dan Shafer
dan at danshafer.com
Mon May 5 03:20:01 EDT 2003
OK, I give up. I've spent a few hours researching this and haven't
found an answer.
Using RR's MetaCard engine as a CGI, how do I grab the HTTP header of
the incoming request so I can parse it and do meaningful work? There
has to be a function that does this, but I am stymied trying to find
it. I have found the libURLLastHTTPHeaders() function but it isn't
working. Perhaps it's not included in the MetaCard engine and therefore
not available to CGI processing, but that seems weird because CGI is
probably 90% of the reason you'd ever want to to get an HTTP header!
Here's my script, set up to run on the MC CGI engine. I know the engine
works. It's just this script that gives me the usual server
configuration error garbage.
#!mc
on startUp
put libURLLastHTTPHeaders() into tResponse
put "Content-Type: text/html" & crlf
put "Content-Length:" & (the length of tResponse) & crlf & crlf
put tResponse
end startUp
Help!
================================================
Dan Shafer, Author, Consultant, Product Development Expert
http://www.shafermedia.com
You are nearly 3 times more likely to need a lawyer than a hospital:
http://www.prepaidlegal.com/info/danshafer
More information about the use-livecode
mailing list