News and commentary from the cross-platform scripting community.
cactus picture Proposed New Parameter for CGIs
By Brent Simmons, bsimmons@wrldpwr.com.

I'd like to propose that a new parameter, the path to the current web site folder, be added to the CGI standard for Macintosh servers.

Currently, two servers support this new parameter, Microsoft's Personal WebServer and Tenon's WebTen.

Why it's important

This parameter is especially important in two cases:

1) In the case of personal web servers where the web server software is not in the same folder as the web site folder; and

2) In the case of virtual domain aware web servers that may have multiple web site folders, one for each virtual domain.

Microsoft's Personal WebServer is an example of the first case, WebTen is an example of the second case.

Agreeing to this standard now allows us to have a standard in place as more web servers become virtual domain aware.

Technical details

It's a straightforward addition to the CGI sdoc event. The key is 'DIRE' and the value is an FSSpec to the current web site folder.

Frontier Support

With the current version of the Frontier CGI Framework, we've solved the issues of parameter order and number of parameters. The framework is now server-agnostic, supporting any Macintosh web server without modification.

The new framework is still technically in beta, but it's been in use by a great number of Frontier scripters for a couple months, and it's included with the latest Frontier 4.2.2.



The new framework already supports the new web site folder parameter, but it works with any server software, whether the server sends this parameter or not.

We've come a long way in Frontier toward supporting all Macintosh servers; now I'd like to extend the standard in a crucial direction to further help the many CGI scripters who use Frontier and other scripting environments.


This is excerpted from a message posted to the WebStar-Dev list by Brent Holland of Tenon. The title is "W*API Plug-In/Apple CGI Operation in a WebTen Virtual Host Environment."

"The W*API CGI specification lacks a corresponding Apple Event parameter to indicate the document root folder for a given request. Under WebTen, an event parameter 'DIRE' has been added to the 'sdoc' Apple event sent by the server. The 'DIRE' parameter is an FSSpec to the document root of the vhost handling the request.

"For seamless operation in a WebTen virtual host environment while remaining compatible with WebSTAR, the CGI should use the 'DIRE' FSSpec if present in the 'sdoc' event in constructing the path to the file being requested."

This page was last built on Fri, Mar 28, 1997 at 1:56:53 PM, with Frontier. Internet service provided by Conxion. Mail to: webmaster@content.scripting.com.