Opening Mathematica files from an http server

Ken Case kc
Fri Jun 30 16:55:58 PDT 1995


> Although I use precisely the same URL format, there is apparently
> a difference in the way files are treated when the http server is
> located on the same subnet.

The problem is that your local server is not configured the same way as the  
remote server.  Here's the explanation I provided to someone who had the  
same problem with their local server.

				Ken

From: Ken Case <kc>
Date: Mon, 27 Mar 95 12:00:12 -0800
Subject: Re: OmniWeb and Mathematica files

> this is really weird:  I downloaded a notebook
> http://www.wri.com/MathSource/Applications/Complexity/0204-613/
> ExactLogistic.ma and it came up o.k. as Mma window. Then
> I saved the same file in my WWW directory
> 	http://www.ccsr.uiuc.edu/~gmk/ExactLogistic.ma
> and try to launch it from there and I got the ascii
> listing of the source.
>
> What is going on?

Well, filenames are a tricky business on the Web.  Since each system has a  
different notion of what a filename represents (for example, Macintosh  
filenames are completely independent of file content), someone invented  
"MIME types", which are a filename-independent way of typing files.

What this means is that when you view your file from your server in  
OmniWeb, your server looks up the filename "ExactLogistic.ma" and decides  
what MIME type it is, and then sends it to across to OmniWeb, which decides  
how to present the file based on what MIME type it is.

WRI's server is advertising the file as "application/mathematica".  OmniWeb  
knows it can't present "application/mathematica" files, so it saves the  
file and asks the Workspace to open it.

Your server is advertising the file as "text/plain".  OmniWeb understands  
that "text/plain" files are just plain text that it can display directly--so  
it does, showing the ascii listing of the source.

To see the file as a Mathematica file, you need to have your webmaster  
configure your server so it advertises ".ma" files with a MIME type of  
"application/mathematica".  It looks like you're using the NCSA server, so   
this is done by editing the conf/mime.types file and adding the line:

	application/mathematica		ma

> P.S. The same thing happens independent if I want to open
> it as file or as URL.

Unfortunately, OmniWeb doesn't know that ".ma" means  
"application/mathematica" either, so the file: reference won't work.  We'll  
be making this more configurable in the future.  For now, though, you should  
be able to fix your server and use that URL.

				Ken


More information about the OmniWeb-l mailing list