WebSTAR 4 Manual & Technical Reference

Manual Contents | Chapter Contents | Previous Page | Next Page

WebSTAR Auto BinHex

Binhexing is a form of encoding that allows you to transfer Mac data files and applications (which include the Mac resource fork) via the Internet. The WebSTAR Auto BinHex Plug-In performs on-the-fly binhex-encoding of files and Macintosh applications. Most browsers have helpers installed to decode binhexed files automatically.

To trigger this behavior, simply append the .hqx suffix to the end of a URL for a file. For instance:

http://www. domain.com /products/widgetsinfo.sit.hqx

will encode the file WidgetsInfo.sit in the products folder and serve it to the browser. There will be some delay while the server processes the file. Then the browser will download it and decode it.

Using Auto BinHex

WebSTAR does not install the WebSTAR Auto BinHex Plug-In by default. Use the WebSTAR Server Suite Installer to install it. It does not require any additional RAM.
The WebSTAR Auto BinHex Plug-In will run anytime a browser sends a URL with .hqx at the end, as long as there's a file named .message in the folder.

To enable auto binhexing for a folder, make sure there is a file named .message in the folder (the file can be empty). This will also allow you to view the contents of the folder, as described in Enabling Directory Indexing: the ".message" File .

When a URL for a file in this folder has the extension .hqx , and the file name does not include that extension, the WebSTAR Auto BinHex Plug-In will automatically encode the file before sending it back. If the file name ends in .hqx , it will be served without encoding.

Encoding can take several minutes if the file is large. When the file is finished encoding, it will start to download through the browser, and you'll see an entry in the Web activity monitor window, and in the log file.

If you dislike the delay in encoding, you can use a program such as StuffIt Deluxe, and encode your larger files manually.

Auto BinHex Settings

The WebSTAR Auto BinHex administration page allows you to specify which files to serve and whether to cache the encoded copies. To change settings on the WebSTAR Auto BinHex Plug-In, use your browser to open the administration page, and choose the Auto BinHex Plug-In at the URL like this:

http://www.domain.com/pi_admin.hqx

(replacing the name www.domain.com with your host name). You can update the settings in this page: don't forget to press the "Save" button at the bottom to save your changes to the server.

Security

The Auto BinHex security section allows you to either binhex and serve almost any kind of file, or to limit the files to those with specific suffixes, so as not to serve application files. The default is to "Allow any file".

WebSTAR Auto BinHex will never allow files with a Creator Code that starts with "WWW" to be BinHexed and served, because these are control files and must be kept secure.

If you choose to limit the suffixes to be served, the default suffixes are:

 
.sit .sea .cpt .bin

You can add more suffixes to this list by typing them in with a space before each. In this case, only files with one of these suffixes will be encoded and served.

Caching

The WebSTAR Auto BinHex default is to cache the encoded copy is in a Temporary Items folder, which is flushed by the system if the cache gets too full, and at shutdown. You can configure the Plug-In to not cache, so it will always Binhex on the fly, which is appropriate for files that are constantly changing.

Binhexing Other Kinds Of Files

At server startup, the WebSTAR Auto BinHex Plug-In automatically adds an entry to the Suffix Mapping table to binhex files that end in the suffix .HQX . To automatically binhex file names using other suffixes, use the WebSTAR Admin to enter a new Suffix Mapping entry with an Action of "BINHEX", like this:

 

	BINHEX  .HQX  *  *  application/binhex4.0
Plug-In Developers, see Calling WebSTAR Auto BinHex .


Manual Contents | Chapter Contents | Previous Page | Next Page