Subject: Client problems

From: [email-masked] (Doug Mink)
Date: Fri, 14 Oct 94 15:31:29 EDT

I'm trying to use saoimage as a browser for SkyView-served images.
The mime files seem to bet up appropriately.  ftp:-served or local
FITS files, when accessed through Mosaic, come up in saoimage, but
when I try to get FITS files from an HTTP server, they appear as
text files in the Mosaic window.  Does anyone have any idea what
I should change?
-Doug Mink

---

From: [email-masked] (Doug Mink)
Date: Fri, 14 Oct 94 19:35:53 EDT

I asked my local WWW guru for assistance with my FITS/saoimage problem,
and he responded with a fix which worked, so I forward it to the list.
-Doug Mink

> To: [email-masked] (Doug Mink)
> Subject: Re: Client problems with FITS
> Date: Fri, 14 Oct 1994 17:44:46 -0400
> From: Alberto Accomazzi <[email-masked]>
> 
> In message <[email-masked]>, Doug Mink
> writes:
> 
> > Alberto,
> > This should probably be "HTTP and FITS files".  When I use Mosaic to acces
> > a FITS file as a local file or using FTP, SAOIMAGE pops up as a browser,
> > but when I access an identical file, with a .fits extension, using HTML,
> > Mosaic tries to display it as a text file.  Do you know how to fix this?
> 
> It's a problem of MIME-typing.  When Mosaic gets something from an
> HTTP server, it is the server's responsibility to tell the browser
> what is being returned.  Obviously HTTP does not know about
> image/x-fits, so it gives up.  I believe that NCSA HTTP 1.3 lets you
> add some mime types.  You should check the documentation online.
> I know that adding this to srm.conf works for compressed files:
> 
> # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
> # information on the fly. Note: Not all browsers support this.
> AddEncoding x-compress Z
> AddEncoding x-gzip gz
> 
> 
> Another solution is using a CGI script that always returns a 
> Content-type: image/x-fits
> to retrieve FITS files (it is kind of a kludge but should work).
> Good luck and let me know what you come up with.
> 
> - Alberto
> 
> Date: Fri, 14 Oct 94 19:25:50 EDT
> From: mink (Doug Mink)
> To: alberto@cfa0
> Subject: Re: Client problems with FITS
> 
> Alberto,
> I updated my httpd to version 1.3 and added the following line to srm.conf
> 
> AddType image/x-fits    .fit    .fits   .fts    .FIT    .FITS
> 
> the restarted httpd.  saoimage now pops up with the html-requested image.
> I have suggested to the SkyView people at Goddard that they do the same.
> Apparently IPAC's system already does the right thing.  Now all I have to
> do is add WCS awareness to saoimage, a task for which I now have the
> libraries.  I hope to have everything working by next Thursday's lunch
> talk.
> -Doug