+2006-12-22 Mauro Tortonesi <mauro@ferrara.linux.it>
+
+ * HTTPTest.pm: Don't ignore initial '/' character in requested URLs.
+
2006-11-10 Mauro Tortonesi <mauro@ferrara.linux.it>
* Test-np.px: Added test for -np.
if ($url_path =~ m{/$}) { # append 'index.html'
$url_path .= 'index.html';
}
- if ($url_path =~ m{^/}) { # remove trailing '/'
- $url_path = substr ($url_path, 1);
- }
+ #if ($url_path =~ m{^/}) { # remove trailing '/'
+ # $url_path = substr ($url_path, 1);
+ #}
if ($log) {
print STDERR "Method: ", $req->method, "\n";
print STDERR "Path: ", $url_path, "\n";
###############################################################################
-my $the_test = HTTPTest->new (name => "Test6",
+my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-1",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
###############################################################################
-my $the_test = HTTPTest->new (name => "Test7",
+my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-2",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
###############################################################################
-my $the_test = HTTPTest->new (name => "Test5",
+my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
###############################################################################
-my $the_test = HTTPTest->new (name => "Test4",
+my $the_test = HTTPTest->new (name => "Test-O-nonexisting",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
###############################################################################
-my $the_test = HTTPTest->new (name => "Test9",
+my $the_test = HTTPTest->new (name => "Test-Restrict-Lowercase",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
###############################################################################
-my $the_test = HTTPTest->new (name => "Test9",
+my $the_test = HTTPTest->new (name => "Test-Restrict-Uppercase",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
# code, msg, headers, content
my %urls = (
- 'firstlevel/index.html' => {
+ '/firstlevel/index.html' => {
code => "200",
msg => "Dontcare",
headers => {
},
content => $mainpage,
},
- 'firstlevel/secondpage.html' => {
+ '/firstlevel/secondpage.html' => {
code => "200",
msg => "Dontcare",
headers => {
},
content => $secondpage,
},
- 'firstlevel/lowerlevel/thirdpage.html' => {
+ '/firstlevel/lowerlevel/thirdpage.html' => {
code => "200",
msg => "Dontcare",
headers => {
},
content => $thirdpage,
},
- 'firstlevel/fourthpage.html' => {
+ '/firstlevel/fourthpage.html' => {
code => "200",
msg => "Dontcare",
headers => {
},
content => $fourthpage,
},
- 'higherlevelpage.html' => {
+ '/higherlevelpage.html' => {
code => "200",
msg => "Dontcare",
headers => {
_output => {},
);
- sub _default_for
- {
- my ($self, $attr) = @_;
- $_attr_data{$attr};
- }
-
- sub _standard_keys
- {
- keys %_attr_data;
- }
+ sub _default_for
+ {
+ my ($self, $attr) = @_;
+ $_attr_data{$attr};
+ }
+
+ sub _standard_keys
+ {
+ keys %_attr_data;
+ }
}