You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Nikolay Melekhin <ni...@mtu-net.ru> on 2002/10/03 13:40:46 UTC
ContentLength in BinaryWrite demo
Source of file binary_write.htm:
<%
use File::Basename;
if($Request->QueryString('type') eq 'gif') {
$Response->{ContentType} = 'image/gif';
open(FILE, 'test.gif') || die "can't open test.gif";
binmode FILE;
$/ = undef;
my $data = <FILE>;
$Response->{ContentLength} = length $data;
$Response->Clear;
$Response->BinaryWrite($data);
$Response->End();
} else {
%>
But I am not found any reference to ContentLength property
in Apache::ASP doc.
--
Best regards, Nikolay Melekhin mailto:nikolay_melehin@mtu-net.ru
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: ContentLength in BinaryWrite demo
Posted by Josh Chamas <jo...@chamas.com>.
Nikolay Melekhin wrote:
> Source of file binary_write.htm:
>
> But I am not found any reference to ContentLength property
> in Apache::ASP doc.
Good catch, its a mistake in the example & I will fix it up
to use the AddHeader method instead.
Thanks,
Josh
________________________________________________________________
Josh Chamas, Founder phone:925-552-0128
Chamas Enterprises Inc. http://www.chamas.com
NodeWorks Link Checking http://www.nodeworks.com
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org