Tests: allow to set empty HTTP/2 connection preface.
diff --git a/lib/Test/Nginx/HTTP2.pm b/lib/Test/Nginx/HTTP2.pm index 0cf257b..24900f6 100644 --- a/lib/Test/Nginx/HTTP2.pm +++ b/lib/Test/Nginx/HTTP2.pm
@@ -36,8 +36,8 @@ my ($port, %extra) = @_; my $s = $extra{socket} || new_socket($port, %extra); - my $preface = $extra{preface} - || 'PRI * HTTP/2.0' . CRLF . CRLF . 'SM' . CRLF . CRLF; + my $preface = defined $extra{preface} ? $extra{preface} + : 'PRI * HTTP/2.0' . CRLF . CRLF . 'SM' . CRLF . CRLF; if ($extra{proxy}) { raw_write($s, $extra{proxy});