> Can you write a patch for our tests that just checks for "text/*"? Attached > > > > > Is this just a bad test? > > Well they're dependent on LWP not being stupid with mime types and changing > them > without any notice. The fails aren't in any indicative of a problem with > apreq's > codebase.
I was in no way impugning the libapreq codebase :) ta Clint
diff -ruN libapreq2-2.12/glue/perl/t/apreq/cgi.t libapreq2-2.12_patched/glue/perl/t/apreq/cgi.t --- libapreq2-2.12/glue/perl/t/apreq/cgi.t 2009-03-06 00:39:05.000000000 +0000 +++ libapreq2-2.12_patched/glue/perl/t/apreq/cgi.t 2009-10-08 15:43:50.000000000 +0000 @@ -25,7 +25,7 @@ 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 @@ 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, diff -ruN libapreq2-2.12/glue/perl/t/apreq/upload.t libapreq2-2.12_patched/glue/perl/t/apreq/upload.t --- libapreq2-2.12/glue/perl/t/apreq/upload.t 2009-03-06 00:39:05.000000000 +0000 +++ libapreq2-2.12_patched/glue/perl/t/apreq/upload.t 2009-10-08 15:43:58.000000000 +0000 @@ -32,7 +32,7 @@ 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 @@ 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,