Champlain

 view release on metacpan or  search on metacpan

examples/capitals.pl  view on Meta::CPAN

			# We return and continue when the server will have more data
			return TRUE;
		}
		
		
		# Read the content		
		my $line;
		my $n = $self->http->read_entity_body($line, 1024);
		$content .= $line;
		
		if ($self->http->keep_alive) {
			# In the case where the HTTP request has keep-alive we need to see if the
			# content has all arrived as read_entity_body() will not tell when the end
			# of the content has been reached.
			return TRUE unless length($content) == $headers{'Content-Length'};
		}
		elsif ($n) {
			# There's still data to read
			return TRUE;
		}
		
		# End of the document



( run in 2.022 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )