You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2010/11/13 07:19:59 UTC
svn commit: r1034682 - in /httpd/apreq/trunk/glue/perl/t/apreq: cgi.t
upload.t
Author: joes
Date: Sat Nov 13 06:19:58 2010
New Revision: 1034682
URL: http://svn.apache.org/viewvc?rev=1034682&view=rev
Log:
apply Clinton Gormley patch for LWP mime-type change to .pod files
Modified:
httpd/apreq/trunk/glue/perl/t/apreq/cgi.t
httpd/apreq/trunk/glue/perl/t/apreq/upload.t
Modified: httpd/apreq/trunk/glue/perl/t/apreq/cgi.t
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/t/apreq/cgi.t?rev=1034682&r1=1034681&r2=1034682&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/t/apreq/cgi.t (original)
+++ httpd/apreq/trunk/glue/perl/t/apreq/cgi.t Sat Nov 13 06:19:58 2010
@@ -25,7 +25,7 @@ if (-d $perlpod) {
closedir $dh;
if (scalar @files > 0) {
my $file = $files[0];
- $types{$file} = ($file =~ /\.pod$/) ? 'text/x-pod' : 'text/plain';
+ $types{$file} = 'text/*';
}
}
@@ -195,6 +195,7 @@ foreach my $file( map {File::Spec->catfi
filename => $file);
$result =~ s{\r}{}g;
my %h = map {$_;} split /[=&;]/, $result, -1;
+ $h{type}=~s{^text/.+}{text/*};
ok t_cmp($h{type}, $types{$basename},
"'type' test for $method on $basename");
ok t_cmp($h{filename}, $basename,
Modified: httpd/apreq/trunk/glue/perl/t/apreq/upload.t
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/t/apreq/upload.t?rev=1034682&r1=1034681&r2=1034682&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/t/apreq/upload.t (original)
+++ httpd/apreq/trunk/glue/perl/t/apreq/upload.t Sat Nov 13 06:19:58 2010
@@ -32,7 +32,7 @@ if (-d $perlpod) {
if (scalar @files > 1) {
for my $i (0 .. 1) {
my $file = $files[$i];
- $types{$file} = ($file =~ /\.pod$/) ? 'text/x-pod' : 'text/plain';
+ $types{$file} = 'text/*';
}
}
}
@@ -64,6 +64,7 @@ foreach my $file( map {File::Spec->catfi
my $result = UPLOAD_BODY("$location?method=$method;has_md5=$has_md5",
filename => $file);
my %h = map {$_;} split /[=&;]/, $result, -1;
+ $h{type}=~s{^text/.+}{text/*};
ok t_cmp($h{type}, $types{$basename},
"'type' test for $method on $basename");
ok t_cmp($h{filename}, $basename,