From: des Date: Tue, 23 Oct 2007 11:57:16 +0000 (+0000) Subject: Add a test case for the root cause of #164, which is that the backend sends X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ad4e6cdc7617aa2f3c1283210c9c354e9db28d1;p=varnish Add a test case for the root cause of #164, which is that the backend sends a garbled response (or no response at all). git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2160 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-tools/regress/lib/Varnish/Test/Server/Connection.pm b/varnish-tools/regress/lib/Varnish/Test/Server/Connection.pm index 70893189..6758e8a1 100644 --- a/varnish-tools/regress/lib/Varnish/Test/Server/Connection.pm +++ b/varnish-tools/regress/lib/Varnish/Test/Server/Connection.pm @@ -67,6 +67,20 @@ sub new($$) { return $self; } +=head2 write + +Write data to the connection + +=cut + +sub write($@) { + my ($self, @data) = @_; + + foreach my $data (@data) { + $self->{'mux'}->write($self->{'fh'}, $data); + } +} + =head2 send_response Called by test-cases to send a given HTTP::Response object out on the