From: Brian Candler Date: 2003-07-18T19:45:18+09:00 Subject: Re: Question re: graphics output of CGIs (mime-type issue?) On Fri, Jul 18, 2003 at 07:28:42PM +0900, Rasputin wrote: > > I tried just using a Content-type of image/jpeg, > > but I got garbage in the browser. > > Don't some browsers insist on looking at filetype > rather than mime-type? What do you mean by "filetype"? Do you mean "extension"? It shouldn't make any different. If the server sends back Content-type: image/jpeg then where is the filename to be found in the response? The browser could look at the source URL (/foo/bar/baz.cgi) but that doesn't tell it anything about the type of the response. I've written CGIs which spit out jpeg's and they've worked, so I think it's likely to be some other trivial problem. Post the URL here and we can test it using telnet to port 80... > Or alternatively (and haven't figured out how to do this yet) > > map all requests to a particular location to your cgi > (i.e. requests to http://yourserver.com/edit-img/ > are mapped to http://yourserver.com/cgi-bin/image.cgi > ) Something like: ScriptAlias "/edit-img" "/usr/local/apache/cgi-bin/image.cgi" ought to do the trick. Regards, Brian.