Hi all,

Playing around again, I fell over some other bits whose behaviour I
didn't like.

If you have a DirIndex like 'index.odt index.html', uri_to_file only
reads the first value. My patch makes it multivalued like with Apache
and most other webservers I know of.

And then my patch modifies $hd->request_uri to include the directory
file, if found; this is the behaviour of Apache and hence, AxKit1 - and
I miss that functionality a lot.

The coding is quick and dirty, making the program rather difficult to
read: If nobody else wants to, I'll rewrite the entire plugin one day to
something a little more readable ;-).

Here's my patch:

56,57c56,57
<     my ($self, $config, $value) = @_;
<     $config->notes($self->plugin_name.'::dirindex',$value);
---
>     my ($self, $config, @value) = @_;
>     $config->notes($self->plugin_name.'::dirindex',@value);
81a82
>     my $dirindex;
85,86c86,93
<             push @path, $self->config('dirindex')
<                 if (defined $self->config('dirindex') && -f
catpath($volume,catdir(@path),$self->config('dirindex')));
---
>           my @dirindex = $self->config('dirindex');
>           foreach my $index (@dirindex) {
>               if (-f catpath($volume,catdir(@path),$index)) {
>                   push @path, $index;
>                   $dirindex = $index;
>                   last;
>               }
>           }
98a106
>
101a110
>     $hd->request_uri($hd->request_uri . $dirindex) if $dirindex;

Regards,
Lars
-- 

Lars Skjærlund
Consultant
 
Ubiquitech A/S
Lyngby Hovedgade 4,3
2800 Kgs. Lyngby
Denmark
 
Tel: +4570200084
Mobile: +4523457157
 
http://www.ubiquitech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to