Grabbing HTTP Headers

Chipp Walters chipp at chipp.com
Mon May 5 03:54:01 EDT 2003


Hi Dan,

Can't help you with the headers in a CGI, but I do have a stack called
"altURL Library" which demonstrates how to grab header data from the socket
(don't know if you really want to get *that* detailed;-)

It's at:
http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm

best,

Chipp

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com
> [mailto:use-revolution-admin at lists.runrev.com]On Behalf Of Dan Shafer
> Sent: Monday, May 05, 2003 2:14 AM
> To: Revolution List
> Subject: Grabbing HTTP Headers
>
>
> 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
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list