CGI in Mac Classic (8.6)

Robert Brenstein rjb at rz.uni-potsdam.de
Thu Jun 26 05:33:24 EDT 2003


Alain,

>1. Does MetaCard implement CGIs on a MacOS-Classic
>(8.6) by supporting the same "on appleEvent" mechanism
>?

yes.

>2. Is "get appleEvent data with <keyword>" supported?

yes.

>3. Can I convert my HyperCard-based CGI to a MC-based
>CGI merely by opening my HC-stack with MetaCard?

mostly yes.

>4. Are there one or more ready-made examples of
>MC-based CGI programs for MacOS-Classic?

yes. see below.

>5. What is the minimal set of HTTP-response-headers
>that CGIs created with MetaCard 2.4+ are required to
>provide? Btw these headers were not necessary in MC
>2.3, but now they are essential.

A need for header is a function of the web server program. When using 
MacHTTP, for example, one may include headers but things work without 
them as well. But including header is trivial. The min header is:

"HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf & "MIME-Version: 
1.0" & crlf & "Content-type: text/html" & crlf & crlf

>
>PS: A working sample script would be ideal.  :)

You can have more than a script -- a complete startup project -- if 
you bother to go to

http://www.robelko.com/metacard/starter-cgi.html

This haven't been updated since MC 2.3 days but should work with only 
minor adjustments.

Robert Brenstein



More information about the metacard mailing list