diff lib/Test/Nginx.pm @ 41:1b3c22a87e5d

Tests: add some HEAD tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 01 Nov 2008 16:19:28 +0300
parents 6cf314ec8f7b
children d68b85def521
line wrap: on
line diff
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -11,7 +11,7 @@ use strict;
 
 use base qw/ Exporter /;
 
-our @EXPORT = qw/ log_in log_out http http_get /;
+our @EXPORT = qw/ log_in log_out http http_get http_head /;
 
 ###############################################################################
 
@@ -195,6 +195,15 @@ Host: localhost
 EOF
 }
 
+sub http_head($) {
+	my ($url) = @_;
+	return http(<<EOF);
+HEAD $url HTTP/1.0
+Host: localhost
+
+EOF
+}
+
 sub http($) {
 	my ($request) = @_;
 	my $reply;