I assume what you're trying to do is have in your html
<img src="image.cgi">

And maybe except paramkaters and display accordingly?

If so all you need to remember is to print the proper headers and don't try to print 
and text.

#!/usr/bin/perl

use File::Slurp;
use CGI qw/:standard/;
 
print header("image/gif");
print read_file("/path/to/img.gif");


Of course you can do all kinds of things like check for 
errors modify the images using various image modules display different images based on 
inout, etc, etc

DMuey

> 
> I need to deliver graphic files (jpg and gif) over http in 
> the same manner that a web server would. Can anyone point me 
> in the right direction? Setting the mime type is no problem 
> but it's the rest that I have no experience of. In the past 
> I've always simply done a location: /path/to/graphic but the 
> graphics are getting cached somewhere along the line so I need to set
> Cache-control: no-cache and the only way I can think of to do 
> this is if my script does the delivery itself.
> 
> I don't have access to the configuration of the web server. 
> Unless it possible to do it in .htaccess?
> 
> I tried the following in .htaccess but no joy, is there a 
> better way of doing this with .htaccess? Possibly at HTTP 1.0 
> server somewhere in the chain is preventing it from working?
> 
> <Files ~ "logo\.jpg$">
>   Header add Cache-Control "no-cache"
> </Files>
> 
> <Files ~ "logo2\.jpg$">
>   Header add Cache-Control "no-cache"
> </Files>
> 
> TIA
> 
> Nigel
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to