[MP2]mod_perl and index.html

[MP2]mod_perl and index.html

am 25.06.2008 08:50:58 von titetluc

------=_Part_6979_21846703.1214376658959
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello all

I am writing a Perl module to authenticate users (using mod_perl2 and httpd
2.2.6.
I would like to display the user name (r->user) when accessing a directory
(/test_index/index.html)

I have the following httpd configuration


DirectoryIndex index.html
Options +indexes


PerlModule Test

Require valid-user
AuthType basic
AuthName test_index
SetHandler perl-script

PerlAuthenHandler Apache2::AuthSSO::Test->set_user

PerlResponseHandler Apache2::AuthSSO::Test->display_user


In addition, I added an empty index.html file in the htdocs/test_index
directory

The Perl Test module is

package Test;
use warnings;
use strict;
use Carp;

use Apache2::Const qw(:common);

sub set_user {
my ($self, $r) = @_;
$r->user('myself');
return OK;
}
sub display_user {
my ($self, $r) = @_;
my $user = defined $r->user ? $r->user : 'user is not defined';
print $user;
return OK;
}

1;

When I access with my browser to http://localhost/test_index/index.html,
user is set to 'myself'
BUT when I access with my browser to http://localhost/test_index/ ... user
is not defined !!!

I don't know if the problem comes from mod_perl or from the httpd
configuration.
Any help would be appreciated.

Thanks

------=_Part_6979_21846703.1214376658959
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello all

I am writing a Perl module to authenticate users (using mod_perl2 and httpd
I would like to display the user name (r->user) when accessing a directory (/test_index/index.html)


I have the following httpd configuration

<Location /test_index>
    DirectoryIndex index.html
    Options +indexes
</Location>

PerlModule Test
<Location /test_index/index.html>

    Require valid-user
    AuthType basic
    AuthName test_index
    SetHandler perl-script

    PerlAuthenHandler Apache2::AuthSSO::Test->set_user

    PerlResponseHandler Apache2::AuthSSO::Test->display_user

</Location>

In addition, I added an empty index.html file in the htdocs/test_index directory

The Perl Test module is

package Test;
use warnings;
use strict;
use Carp;

use Apache2::Const qw(:common);


sub set_user {
    my ($self, $r) = @_;
    $r->user('myself');
    return OK;
}
sub display_user {
    my ($self, $r) = @_;
    my $user = defined $r->user ? $r->user : 'user is not defined';

    print $user;
    return OK;
}

1;

When I access with my browser to ... user is not defined !!!


I don't know if the problem comes from mod_perl or from the httpd configuration.
Any help would be appreciated.

Thanks


------=_Part_6979_21846703.1214376658959--

Re: [MP2]mod_perl and index.html

am 26.06.2008 08:45:03 von titetluc

------=_Part_12622_2419629.1214462703386
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/25 titetluc titetluc :

> Hello all
>
> I am writing a Perl module to authenticate users (using mod_perl2 and httpd
> 2.2.6.
> I would like to display the user name (r->user) when accessing a directory
> (/test_index/index.html)
>
> I have the following httpd configuration
>
>
> DirectoryIndex index.html
> Options +indexes
>

>
> PerlModule Test
>
> Require valid-user
> AuthType basic
> AuthName test_index
> SetHandler perl-script
>
> PerlAuthenHandler Apache2::AuthSSO::Test->set_user
>
> PerlResponseHandler Apache2::AuthSSO::Test->display_user
>

>
> In addition, I added an empty index.html file in the htdocs/test_index
> directory
>
> The Perl Test module is
>
> package Test;
> use warnings;
> use strict;
> use Carp;
>
> use Apache2::Const qw(:common);
>
> sub set_user {
> my ($self, $r) = @_;
> $r->user('myself');
> return OK;
> }
> sub display_user {
> my ($self, $r) = @_;
> my $user = defined $r->user ? $r->user : 'user is not defined';
> print $user;
> return OK;
> }
>
> 1;
>
> When I access with my browser to http://localhost/test_index/index.html,
> user is set to 'myself'
> BUT when I access with my browser to http://localhost/test_index/ ... user
> is not defined !!!
>
> I don't know if the problem comes from mod_perl or from the httpd
> configuration.
> Any help would be appreciated.
>
> Thanks
>


I found a thread related to directory indexes (
http://marc.info/?l=apache-modperl&m=119996305532711&w=2)
According to this thread, user information could be retrieved with
$r->main->user

But in my configuration, when accessing to http://localhost/test_index/,
$r->main is always undefined in the PerlResponseHandler !!!!

Please help

Thanks

------=_Part_12622_2419629.1214462703386
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/25 titetluc titetluc <>:


Hello all

I am writing a Perl module to authenticate users (using mod_perl2 and httpd
I would like to display the user name (r->user) when accessing a directory (/test_index/index.html)



I have the following httpd configuration

<Location /test_index>
    DirectoryIndex index.html
    Options +indexes
</Location>

PerlModule Test
<Location /test_index/index.html>


    Require valid-user
    AuthType basic
    AuthName test_index
    SetHandler perl-script

    PerlAuthenHandler Apache2::AuthSSO::Test->set_user

    PerlResponseHandler Apache2::AuthSSO::Test->display_user


</Location>

In addition, I added an empty index.html file in the htdocs/test_index directory

The Perl Test module is

package Test;
use warnings;
use strict;
use Carp;

use Apache2::Const qw(:common);



sub set_user {
    my ($self, $r) = @_;
    $r->user('myself');
    return OK;
}
sub display_user {
    my ($self, $r) = @_;
    my $user = defined $r->user ? $r->user : 'user is not defined';


    print $user;
    return OK;
}

1;

When I access with my browser to , user is set to 'myself'

BUT when I access with my browser to ... user is not defined !!!


I don't know if the problem comes from mod_perl or from the httpd configuration.
Any help would be appreciated.

Thanks



I found a thread related to directory indexes ()

According to this thread, user information could be retrieved with $r->main->user

But in my configuration, when accessing to , $r->main is always undefined in the PerlResponseHandler !!!!


Please help

Thanks


------=_Part_12622_2419629.1214462703386--

Re: [MP2]mod_perl and index.html

am 26.06.2008 13:28:45 von torsten.foertsch

On Wed 25 Jun 2008, titetluc titetluc wrote:
> PerlModule Test
>
> =A0 =A0 Require valid-user
> =A0 =A0 AuthType basic
> =A0 =A0 AuthName test_index
> =A0 =A0 SetHandler perl-script
>
> =A0 =A0 PerlAuthenHandler Apache2::AuthSSO::Test->set_user
>
> =A0 =A0 PerlResponseHandler Apache2::AuthSSO::Test->display_user
>

>
> In addition, I added an empty index.html file in the htdocs/test_index
> directory
>
> The Perl Test module is
>
> package Test;
> use warnings;
> use strict;
> use Carp;
>
> use Apache2::Const qw(:common);
>
> sub set_user {
> =A0 =A0 my ($self, $r) =3D @_;
> =A0 =A0 $r->user('myself');
> =A0 =A0 return OK;
> }
> sub display_user {
> =A0 =A0 my ($self, $r) =3D @_;
> =A0 =A0 my $user =3D defined $r->user ? $r->user : 'user is not defined';
> =A0 =A0 print $user;
> =A0 =A0 return OK;
> }
>
> 1;
>
> When I access with my browser to http://localhost/test_index/index.html,
> user is set to 'myself'
> BUT when I access with my browser to http://localhost/test_index/ ... user
> is not defined !!!

What happens here? When you access .../index.html your main request matches=
=20
the location condition and is served accordingly. If you access .../ the ma=
in=20
request goes through all phases up to fixup missing the location directives=
=20
because the condition does not match. In fixup mod_dir creates an URI subre=
q=20
for each DirectoryIndex.

mod_dir.c contains the following code:

/* The sub request lookup is very liberal, and the core map_to_stor=
age
* handler will almost always result in HTTP_OK as /foo/index.html
* may be /foo with PATH_INFO=3D"/index.html", or even / with
* PATH_INFO=3D"/foo/index.html". To get around this we insist that=
the
* the index be a regular filetype.
*
* Another reason is that the core handler also makes the assumption
* that if r->finfo is still NULL by the time it gets called, the
* file does not exist.
*/
if (rr->status == HTTP_OK
&& ( (rr->handler && !strcmp(rr->handler, "proxy-server"))
|| rr->finfo.filetype == APR_REG)) {
ap_internal_fast_redirect(rr, r);
return OK;
}

You see, for the DirectoryIndex feature to work properly the index document=
=20
has to have an associated file. Your index document is a PerlResponseHandle=
r.=20
So, I suspect there is no index.html file. In that case $r->filename=20
is "/path/to/test_index" and $r->path_info "index.html" for the subreq.

Use the source, Luke!

Now, I think you can make it working in one of these ways:

1) create .../test_index/index.html as a regular file.
2) redirect /test_index/index.html to a file (Alias ....).

Torsten

=2D-
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net

Re: [MP2]mod_perl and index.html

am 26.06.2008 16:36:49 von titetluc

------=_Part_14196_15646667.1214491009653
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/26 Torsten Foertsch :

> On Wed 25 Jun 2008, titetluc titetluc wrote:
> > PerlModule Test
> >
> > Require valid-user
> > AuthType basic
> > AuthName test_index
> > SetHandler perl-script
> >
> > PerlAuthenHandler Apache2::AuthSSO::Test->set_user
> >
> > PerlResponseHandler Apache2::AuthSSO::Test->display_user
> >

> >
>

******
> In addition, I added an empty index.html file in the htdocs/test_index
> directory


> >
> > The Perl Test module is
> >
> > package Test;
> > use warnings;
> > use strict;
> > use Carp;
> >
> > use Apache2::Const qw(:common);
> >
> > sub set_user {
> > my ($self, $r) = @_;
> > $r->user('myself');
> > return OK;
> > }
> > sub display_user {
> > my ($self, $r) = @_;
> > my $user = defined $r->user ? $r->user : 'user is not defined';
> > print $user;
> > return OK;
> > }
> >
> > 1;
> >
> > When I access with my browser to http://localhost/test_index/index.html,
> > user is set to 'myself'
> > BUT when I access with my browser to http://localhost/test_index/ ...
> user
> > is not defined !!!
>
> What happens here? When you access .../index.html your main request matches
> the location condition and is served accordingly. If you access .../ the
> main
> request goes through all phases up to fixup missing the location directives
> because the condition does not match. In fixup mod_dir creates an URI
> subreq
> for each DirectoryIndex.
>
> mod_dir.c contains the following code:
>
> /* The sub request lookup is very liberal, and the core
> map_to_storage
> * handler will almost always result in HTTP_OK as /foo/index.html
> * may be /foo with PATH_INFO="/index.html", or even / with
> * PATH_INFO="/foo/index.html". To get around this we insist that
> the
> * the index be a regular filetype.
> *
> * Another reason is that the core handler also makes the assumption
> * that if r->finfo is still NULL by the time it gets called, the
> * file does not exist.
> */
> if (rr->status == HTTP_OK
> && ( (rr->handler && !strcmp(rr->handler, "proxy-server"))
> || rr->finfo.filetype == APR_REG)) {
> ap_internal_fast_redirect(rr, r);
> return OK;
> }
>
> You see, for the DirectoryIndex feature to work properly the index document
> has to have an associated file. Your index document is a
> PerlResponseHandler.
> So, I suspect there is no index.html file. In that case $r->filename
> is "/path/to/test_index" and $r->path_info "index.html" for the subreq.
>
> Use the source, Luke!
>
> Now, I think you can make it working in one of these ways:
>
> 1) create .../test_index/index.html as a regular file.
> 2) redirect /test_index/index.html to a file (Alias ....).
>

Torsten

I created the test_index/index.html as a regular file (see the stars above
;-)).
The effect is that my PerlResponseHandler is correctly called.

But my problem is that I can not retrieved the user (set in the
PerlAuthenHandler) in the PerlResponseHandler.

In PerlResponseHandler, $r->main and $r->prev are undefined. I can not
understand why $r->main AND $r->prev are not defined (intuitively, $r->prev
should be defined)




> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: torsten.foertsch@gmx.net

------=_Part_14196_15646667.1214491009653
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/26 Torsten Foertsch <>:


On Wed 25 Jun 2008, titetluc titetluc wrote:

> PerlModule Test

> <Location /test_index/index.html>

>     Require valid-user

>     AuthType basic

>     AuthName test_index

>     SetHandler perl-script

>

>     PerlAuthenHandler Apache2::AuthSSO::Test->set_user

>

>     PerlResponseHandler Apache2::AuthSSO::Test->display_user

> </Location>

>
 
****** 

> In addition, I added an empty index.html file in the htdocs/test_index

> directory



>

> The Perl Test module is

>

> package Test;

> use warnings;

> use strict;

> use Carp;

>

> use Apache2::Const qw(:common);

>

> sub set_user {

>     my ($self, $r) = @_;

>     $r->user('myself');

>     return OK;

> }

> sub display_user {

>     my ($self, $r) = @_;

>     my $user = defined $r->user ? $r->user : 'user is not defined';

>     print $user;

>     return OK;

> }

>

> 1;

>

> When I access with my browser to ,

> user is set to 'myself'

> BUT when I access with my browser to ... user

> is not defined !!!



What happens here? When you access .../index.html your main request matches

the location condition and is served accordingly. If you access .../ the main

request goes through all phases up to fixup missing the location directives

because the condition does not match. In fixup mod_dir creates an URI subreq

for each DirectoryIndex.



mod_dir.c contains the following code:



       /* The sub request lookup is very liberal, and the core map_to_storage

        * handler will almost always result in HTTP_OK as /foo/index.html

        * may be /foo with PATH_INFO="/index.html", or even / with

        * PATH_INFO="/foo/index.html". To get around this we insist that the

        * the index be a regular filetype.

        *

        * Another reason is that the core handler also makes the assumption

        * that if r->finfo is still NULL by the time it gets called, the

        * file does not exist.

        */

       if (rr->status == HTTP_OK

           && (   (rr->handler && !strcmp(rr->handler, "proxy-server"))

               || rr->finfo.filetype == APR_REG)) {

           ap_internal_fast_redirect(rr, r);

           return OK;

       }



You see, for the DirectoryIndex feature to work properly the index document

has to have an associated file. Your index document is a PerlResponseHandler.

So, I suspect there is no index.html file. In that case $r->filename

is "/path/to/test_index" and $r->path_info "index.html" for the subreq.



Use the source, Luke!



Now, I think you can make it working in one of these ways:



1) create .../test_index/index.html as a regular file.

2) redirect /test_index/index.html to a file (Alias ....).


Torsten


I created the test_index/index.html as a regular file (see the stars above ;-)).
The effect is
that my PerlResponseHandler is correctly called.

But my problem is that I can not retrieved the user
(set in the PerlAuthenHandler) in the PerlResponseHandler.

In PerlResponseHandler, $r->main and
$r->prev are undefined. I can not understand why $r->main AND
$r->prev are not defined (intuitively, $r->prev should be defined)






Torsten



--

Need professional mod_perl support?

Just hire me:




------=_Part_14196_15646667.1214491009653--

Re: [MP2]mod_perl and index.html

am 26.06.2008 17:07:36 von torsten.foertsch

On Thu 26 Jun 2008, titetluc titetluc wrote:
> In PerlResponseHandler, $r->main and $r->prev are undefined. I can not
> understand why $r->main AND $r->prev are not defined (intuitively, $r->prev
> should be defined)

I'd expect $r->user to be set, not $r->prev->user nor $r->main->user. But I'd
expect $r->prev to be set because $r is the result of an internal redirect.
But I am not sure what exactly ap_internal_fast_redirect does.

Oh my, I found it. ap_internal_fast_redirect isn't exactly an internal
redirect. Instead it overrides the current request with a subreq. Look at
modules/http/http_request.c. There is a comment that says something about
that function:

/* XXX: Is this function is so bogus and fragile that we deep-6 it? */
AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)

And yes, it forgets about $r->user at least in apache 2.2.6. Maybe you file a
bug for apache?

You can check in the AuthenHandler for $r->main. If it is true you can set
$r->user as well as $r->main->user.

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net

Re: [MP2]mod_perl and index.html

am 27.06.2008 10:37:01 von titetluc

------=_Part_17518_24861756.1214555821284
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/26, Torsten Foertsch :
>
> On Thu 26 Jun 2008, titetluc titetluc wrote:
> > In PerlResponseHandler, $r->main and $r->prev are undefined. I can not
> > understand why $r->main AND $r->prev are not defined (intuitively,
> $r->prev
> > should be defined)
>
>
> I'd expect $r->user to be set, not $r->prev->user nor $r->main->user. But
> I'd
> expect $r->prev to be set because $r is the result of an internal redirect.
> But I am not sure what exactly ap_internal_fast_redirect does.
>
> Oh my, I found it. ap_internal_fast_redirect isn't exactly an internal
> redirect. Instead it overrides the current request with a subreq. Look at
> modules/http/http_request.c. There is a comment that says something about
> that function:
>
> /* XXX: Is this function is so bogus and fragile that we deep-6 it? */
> AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)
>
> And yes, it forgets about $r->user at least in apache 2.2.6. Maybe you
> file a
> bug for apache?


Would it be rather a wrong httpd configuration: my requirement is very
common (calling a response handler for an index.html and access the r->user
information). I may misconfigure Apache ????

BTW, how can I verify if it is a bug ? Which apache mailing list do I have
to use ?


You can check in the AuthenHandler for $r->main. If it is true you can set
> $r->user as well as $r->main->user.
>
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: torsten.foertsch@gmx.net
>

------=_Part_17518_24861756.1214555821284
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline



2008/6/26, Torsten Foertsch <>:

On Thu 26 Jun 2008, titetluc titetluc wrote:
> In PerlResponseHandler, $r->main and $r->prev are undefined. I can not
> understand why $r->main AND $r->prev are not defined (intuitively, $r->prev

> should be defined)


I'd expect $r->user to be set, not $r->prev->user nor $r->main->user. But I'd
expect $r->prev to be set because $r is the result of an internal redirect.

But I am not sure what exactly ap_internal_fast_redirect does.

Oh my, I found it. ap_internal_fast_redirect isn't exactly an internal
redirect. Instead it overrides the current request with a subreq. Look at

modules/http/http_request.c. There is a comment that says something about
that function:

/* XXX: Is this function is so bogus and fragile that we deep-6 it? */
AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)


And yes, it forgets about $r->user at least in apache Maybe you file a
bug for apache?

Would it be rather a wrong httpd configuration: my requirement is very common (calling a response handler for an index.html and access the r->user information). I may misconfigure Apache ????


BTW, how can I verify if it is a bug ? Which apache mailing list do I have to use ?



You can check in the AuthenHandler for $r->main. If it is true you can set
$r->user as well as $r->main->user.


Torsten

--
Need professional mod_perl support?
Just hire me:




------=_Part_17518_24861756.1214555821284--

Re: [MP2]mod_perl and index.html

am 27.06.2008 12:02:59 von torsten.foertsch

On Fri 27 Jun 2008, titetluc titetluc wrote:
> Would it be rather a wrong httpd configuration: my requirement is very
> common (calling a response handler for an index.html and access the r->user
> information). I may misconfigure Apache ????
>
> BTW, how can I verify if it is a bug ? Which apache mailing list do I have
> to use ?

On the apache httpd website http://httpd.apache.org you'll find instructions
how to file a bug.

I have verified it without mod_perl with apache 2.2.9:

DirectoryIndex index.shtml
Options Includes Indexes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


Require valid-user
AuthType basic
AuthName "Something very secret"
AuthUserFile /path/to/htpasswd


My index.shtml reads:



Hello








If /index.shtml is requested all works normal. If only / is requested I get
the password prompt. Then it shows the page but the REMOTE_USER variable is
unset. This variable is r->user.

File the bug then send its number to the list. I'll fill in the details. In
your bug description you can reference this thread:

http://www.gossamer-threads.com/lists/modperl/modperl/97533

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net

Re: [MP2]mod_perl and index.html

am 27.06.2008 14:06:43 von Rolf Schaufelberger

Am Donnerstag, 26. Juni 2008 16:36:49 schrieb titetluc titetluc:
> > > sub set_user {
> > > =A0 =A0 my ($self, $r) =3D @_;


Shouldn't that be=20

sub set_user :method {
my ($self, $r) =3D @_;

When you use $r as second argument ?

=2D-=20
Rolf Schaufelberger

Re: [MP2]mod_perl and index.html

am 27.06.2008 14:22:57 von titetluc

------=_Part_18143_20077425.1214569377391
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/27, Rolf Schaufelberger :
>
> Am Donnerstag, 26. Juni 2008 16:36:49 schrieb titetluc titetluc:
>
> > > > sub set_user {
> > > > my ($self, $r) = @_;
>
>
>
> Shouldn't that be
>
> sub set_user :method {
> my ($self, $r) = @_;
>
> When you use $r as second argument ?



I am not a mod_perl specialist, but declaring the method without the :method
attribute works correctly. According to
http://perl.apache.org/docs/2.0/user/coding/coding.html#Meth od_Handlers, the
:method attribute is not required


--
>
> Rolf Schaufelberger
>

------=_Part_18143_20077425.1214569377391
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline



2008/6/27, Rolf Schaufelberger <>:

Am Donnerstag, 26. Juni 2008 16:36:49 schrieb titetluc titetluc:

> > > sub set_user {
> > >     my ($self, $r) = @_;



Shouldn't that be

  sub set_user  :method {

     my ($self, $r) = @_;

When you use $r as second argument ?


I am not a mod_perl specialist, but declaring the method without the :method attribute works correctly. According to , the :method attribute is not required



--

Rolf Schaufelberger



------=_Part_18143_20077425.1214569377391--

Re: [MP2]mod_perl and index.html

am 27.06.2008 14:25:07 von titetluc

------=_Part_18159_9358311.1214569507669
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Torsten,

I created a bug. Bug number is
45297

Thank you very much for your help

2008/6/27, Torsten Foertsch :
>
> On Fri 27 Jun 2008, titetluc titetluc wrote:
> > Would it be rather a wrong httpd configuration: my requirement is very
> > common (calling a response handler for an index.html and access the
> r->user
> > information). I may misconfigure Apache ????
> >
> > BTW, how can I verify if it is a bug ? Which apache mailing list do I
> have
> > to use ?
>
>
> On the apache httpd website http://httpd.apache.org you'll find
> instructions
> how to file a bug.
>
> I have verified it without mod_perl with apache 2.2.9:
>
> DirectoryIndex index.shtml
> Options Includes Indexes
> AddType text/html .shtml
> AddOutputFilter INCLUDES .shtml
>
>
>
> Require valid-user
> AuthType basic
>
> AuthName "Something very secret"
> AuthUserFile /path/to/htpasswd
>

>
> My index.shtml reads:
>
>
>
>

Hello


>

>
>

>
>
>
> If /index.shtml is requested all works normal. If only / is requested I get
> the password prompt. Then it shows the page but the REMOTE_USER variable is
> unset. This variable is r->user.
>
> File the bug then send its number to the list. I'll fill in the details. In
> your bug description you can reference this thread:
>
> http://www.gossamer-threads.com/lists/modperl/modperl/97533
>
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: torsten.foertsch@gmx.net
>

------=_Part_18159_9358311.1214569507669
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Torsten,

I created a bug. Bug number is >:

On Fri 27 Jun 2008, titetluc titetluc wrote:
> Would it be rather a wrong httpd configuration: my requirement is very
> common (calling a response handler for an index.html and access the r->user
> information). I may misconfigure Apache ????

>
> BTW, how can I verify if it is a bug ? Which apache mailing list do I have
> to use ?


On the apache httpd website you'll find instructions

how to file a bug.

I have verified it without mod_perl with apache 2.2.9:

DirectoryIndex index.shtml
Options Includes Indexes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


<Location /index.shtml>

    Require valid-user
    AuthType basic

    AuthName "Something very secret"
    AuthUserFile /path/to/htpasswd
</Location>

My index.shtml reads:


<html>
<body>
<h1>Hello <!--#echo var="REMOTE_USER" --></h1>
<pre>
<!--#printenv -->
</pre>
</body>
</html>

If /index.shtml is requested all works normal. If only / is requested I get

the password prompt. Then it shows the page but the REMOTE_USER variable is
unset. This variable is r->user.

File the bug then send its number to the list. I'll fill in the details. In
your bug description you can reference this thread:


  




------=_Part_18159_9358311.1214569507669--