<cfcontent file="../html/image1.gif" type="image/gif">



Matt

-----Original Message-----
From: Christopher Porter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 12:53 PM
To: CF-Talk
Subject: headers question


ok here's a perl script.. i have a 20$ bet with a friend that it can be
done in CF and of course theres only one hard part to it...


#!/usr/bin/perl

print "Content-type: image/gif\n";

open IMAGEFILE, "<../html/image1.gif";
my $length = (stat(IMAGEFILE))[7];

print "Content-length: $length\n\n";

read(IMAGEFILE, $image, $length);

print "$image";






the real kicker here is that the perl script is altering the content-type
header and changing it to a a type of 'image'... ideally with cfserver 4.5
out and its capability of handling binary data, it would bre great to be
able to make CF serve images or other binary data...

in research, i found the <cfheader> tag, but it wont overwrite headers,
only create new ones.. (even if they have the same name.)

anyone know of an open source custom tag that might be able to do this..
my guess is that it has to be a cfx tag as there's no cf tag avail to
change the headers block..

thnx for yer help in advance (and to answer the next questions... sure
i'll split the 20$ if i win :)... the deadline for the bet is sat
midnight.. end of hte week)

-chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to