Search code examples
http-headersg-wan

G-Wan perl header for gif file types


I've created a perl script c.pl

print "Content-type: image/gif\n\n";
...    
and
...
exit 200;

output is :

Content-type: image/gif GIF89an

... this is wrong. it seems to generate output of Content-type: text/html prior...

how can I make it output as image/gif header?


Solution

  • The default Content-type HTTTP header is text/html. But you can (and here should) change it - either by using CGI variables or by writting your HTTP headers from your script.

    G-WAN comes with many examples doing that, see fractal.c.