Skip Menu |

This queue is for tickets about the Net-DAV-Server CPAN distribution.

Report information
The Basics
Id: 60883
Status: new
Priority: 0/
Queue: Net-DAV-Server

People
Owner: Nobody in particular
Requestors: contact [...] clipland.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.300_05
Fixed in: (no value)



Subject: Return a proper mime type on GET and PROPFIND
HEAD and GET file requests, GET html dir listings and PROPFIND should return a proper mime-type for files, for example with a call to _get_mime($path,'application/octet-stream') sub _get_mime { my $path = shift; my $fallback = shift; # patch1: I don't know if this breaks WebDAV RFC, but let's # try to return an actual mime type my $mt = MIME::Types->new; my $mime = $mt->mimeTypeOf($path); # also possible to detect mime with: # my $mime = LWP::MediaTypes::guess_media_type($path); # or # # File::MMagic if($mime){ return $mime; }else{ if($fallback){ return $fallback; }else{ return 'httpd/unix-file'; } } }