httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: odd content length goings on
Date Mon, 27 Aug 2001 12:46:22 GMT
Marc Slemko <marcs@znep.com> writes:

> Erm... why would we be unable to read the data?
> 
> I have the exact same CGI.  If I have it output, for example, 6k of data
> there is never a content-length.  If I have it output, for example, 10k of 
> data, there is.

is there some buffering or pausing going on which affects the
length=6k case?  I get a content-length for lengths up to 32K or so.

---------anylength.pl---------
#!/usr/local/bin/perl -w

BEGIN
{
  use CGI::Carp qw(fatalsToBrowser);
}

use strict;

use CGI;

my $q = new CGI;
my $offset = $q->param('length');
my $i;

if (!$offset)
{
  die "Yo!  I need an offset!";
}

print "Content-type: text/html\n\n";

$i = 0;
while ($offset > 0)
{
  if (($i % 50) eq 0)
  {
    print "\n";
  }
  else
  {
    print "1";
  }
  ++$i;
  --$offset;
}
--------------------------

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message