Version History

A part of the
Web Tools

peacePipe: re-connecting Applescript CGIs to the apache Web

One of the attractive features of the early years of Macintosh web serving was the availability of Applescript support in the early servers (MacHTTP, WebStar, Web-Ten, etc). Originally supported through the adhoc "sdoc" event, this functionality has since been incorporated as the "handle CGI event" available in the standard Applescript dictionary. Unfortunately, with the advent of OS-X, server support for Applescript went away. Personal Web Sharing is now reliant on the very robust apache server, which is great, but apache does not directly support "sdoc" (AppleEvent) CGIs such as Applescripts. Further, the apache server is run as an invisible background process (usually owned by "www"). Due to the way Apple implemented OS-X, neither apache, nor any apache (shell) CGI scripts are able to directly access AppleEvent applications such as Applescripts. Applescript CGIs are locked behind a wall, or have been. peacePipe is intended to free them.

peacePipe enables Applescript CGIs to be used on a Mac OS-X (apache) server using "Personal Web Sharing". It does this through a client-server mechanism. peacePipe requires that a user be logged on and running the peacePipe 'server' within a Terminal window command-line environment. This server is able to launch and talk to Applescript CGIs. When apache receives a request for an Applescript cgi it invokes the client application. The client packages and pipes the CGI environment data to the server, which then invokes the desired Applescript CGI through the traditional "handle CGI event" interface. Results, when returned, are passed back to the client, which returns them to the browser.

    Brian R. Johnson
    February 10, 2005