Re: Apache::Registry - a thought

2001-05-01 Thread Pete Jordan

Oh ghod, what have I started... :)

I promise not to add footnotes to my messages in future...

/Pete/ 



Re: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread will trillich

Chris Strom wrote:
 
  -Original Message-
  From: will trillich [mailto:[EMAIL PROTECTED]]
  Sent: Monday, April 30, 2001 9:44 PM
  To: [EMAIL PROTECTED]
  Subject: PerlAccessHandler -- struggling and drowning

  this is a PerlAccessHandler, which should check for the existence
  of a cookie in the incoming headers, and if not there (or
  expired) it should redirect the browser to a login area that
  takes name/password pair, and if valid, would then return the
  browser to the original URL. to do that, as we issue the
  'redirect to the login area' we set a cookie containing the URL
  to return to.

 I can't say as I've had any problems using
 err_headers_out-add(Set-Cookie) with any browsers.  I'm surprised to hear
 that you've had problems with it. 

even DURING a redirect? i seem to have hit a chord here, as
i'm getting lots of me too in my mailbox.

 You might simply try giving up the use of
 a cookie for this, and encode the return URL in a query string instead.
 This is guaranteed to work regardless of browser, but you'll have to pass
 this information between pages (a reasonable trade off for choosing to
 support silly browsers, I suppose).

something else i'm trying now is

$r-set_handlers(PerlHandler = undef);
$r-push_handlers( PerlHandler = sub { ...print meta http-equiv...

but THIS for some reason redirects the browser back to itself,
instead of to the login area. the protected area is /protected
and the login area is /login so the http-equiv tag looks like
meta http-equiv=Refresh content=0; http://www.fricking-site.com/login;
but it cycles back to www.cannot-get-in.com/protected instead... !

this is bizarre enough i'm considering joining a monastery. at least
there, it's quiet.

-- 
mailto:[EMAIL PROTECTED]
http://www.dontUthink.com/



Re: forbidden vs. cookie

2001-05-01 Thread Ken Y. Clark

On Mon, 30 Apr 2001, will trillich wrote:

 Date: Mon, 30 Apr 2001 18:17:11 -0500
 From: will trillich [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: forbidden vs. cookie

 On Mon, Apr 30, 2001 at 03:46:17PM -0400, Ken Y. Clark wrote:
  Here is some code I've used in the past in a mod_perl app to
  set a cookie and do a redirect at the same time.  I believe it
  works for most browsers -- or at least this code has been
  working for over a year and I haven't heard too many complaints
  about this piece (that I can think of).
 
  my $cookie = Apache::Cookie-new($apr,
   -name= 'foo',
   -value   = 'bar',
   -expires = '+30m',
   -domain  = '.domain.com',
   -path= '/',
  );
  $cookie-bake;
 
  $apr-method_number(M_GET);
  $apr-method('GET');
  $apr-headers_in-unset('Content-length');
  $apr-headers_out-add('Location' = '/foo');
  $apr-status(REDIRECT);
  $apr-send_http_header;
  return OK;

 i presume $apr is as in sub handler { my $apr = shift; ...  ?

Yes.  I'm sorry, I should have been more explicit.  Actually, the
first line of the handler() is this:

my $apr = Apache::Request-new( shift() );

 and is this in PerlAuthhandler?

No, I used this in a PerlHandler as the Location for logging a user
into the mp3.boston.com site.  Again, I believe my method works --
though I never tested it exhaustively in every conceivable browser.  I
simply made sure it worked on the major browsers (Netscape and IE) on
Linux, Solaris, Mac and Windows.  I wanted to do exactly what you
want:  Set a cookie (mine being the logged in information) and
simulaneously redirect the user to their home page on the site.

I do, however, use a PerlAccessHandler like so:

Location /upload
PerlAccessHandler BGEP::MP3::VerifyLogin
ErrorDocument 403 http://mp3.boston.com/login/login.shtml
/Location

It checks every request for a valid session cookie (which contains
nothing more than the user's id and will fail to be returned when the
cookie expires).

 after seeing the 'expires' dilemma brought about by poorly
 configured client system clocks, what advice should we follow?
 (what's the Official Party Line on expiring cookies?)

I'm not really sure how to answer your question.  I have usually
understood that the client handles all of this.  That is, you tell the
client that the cookie is good for 30 minutes, and it figures out when
those 30 minutes have expired and then quits sending a valid cookie back
to the server.  Is that right?  Anyone?  Anyone?  Bueller?

ky




Re: forbidden vs. cookie

2001-05-01 Thread Stephen Reppucci


Howdy Ken!

I think there are two separate issues here -- there's an expiration
time on the cookie, which is your app's instruction to the client as
to how long the cookie should be kept.  Then there's an expiration
time of the ticket represented by that cookie data (to use the
Ticket Auth example), which is the length of time the ticket is
valid for.

The ticket expiration time should be in a (tamper-proof) container
encoded within the cookie, and checked by the server side app for
freshness with each request.

Allowing a client's broken idea of the current time (whether broken
through maliciousness or through ignorance) to affect the duration
of the ticket's validity is (IMO) a bad thing.

If the client's broken idea of the time causes the cookie not to be
stored for the correct duration, oh well, that's *their* problem,
right?

As Tom Christiansen likes to preach Never trust anything sent from
the client.

Steve

On Tue, 1 May 2001, Ken Y. Clark wrote:

 On Mon, 30 Apr 2001, will trillich wrote:
  after seeing the 'expires' dilemma brought about by poorly
  configured client system clocks, what advice should we follow?
  (what's the Official Party Line on expiring cookies?)

 I'm not really sure how to answer your question.  I have usually
 understood that the client handles all of this.  That is, you tell the
 client that the cookie is good for 30 minutes, and it figures out when
 those 30 minutes have expired and then quits sending a valid cookie back
 to the server.  Is that right?  Anyone?  Anyone?  Bueller?


-- 
Steve Reppucci   [EMAIL PROTECTED] |
Logical Choice Software  http://logsoft.com/ |
=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=





Re: [phil@fifi.org: Bug#85328: New method $req-allowed() forlibapache-mod-perl]

2001-05-01 Thread Doug MacEachern

On Fri, 9 Feb 2001, Daniel Jacobowitz wrote:

 [please maintain the CC's]
 
 I just received the following bug report on the Debian bug tracking
 system.  The patch seems to apply to 1.25; is it a good idea?

thanks, applied to cvs for 1.26-tobe.  (and sorry for the delay)





Re: [PATCH] [phil@fifi.org: Bug#86964: One more method ( patch)for libapache-mod-perl]

2001-05-01 Thread Doug MacEachern

On Sun, 4 Mar 2001, Daniel Jacobowitz wrote:

 Here's another reasonable-looking patch from Philippe Troin; it exposes
 child_num() in Apache::Connection.

i hesitate adding this to Connection.xs at this point since it is 1.3
specific.  but i would be happy to include it as an new method
Apache::Scoreboard.

--- Scoreboard.xs~  Mon Jun  5 11:58:01 2000
+++ Scoreboard.xs   Tue May  1 11:10:24 2001
@@ -392,3 +392,15 @@
 
 OUTPUT:
 RETVAL
+
+MODULE = Apache::Scoreboard   PACKAGE = Apache::Connection
+
+int
+child_num(conn)
+Apache::Connection conn
+
+CODE:
+RETVAL = conn-child_num;
+
+OUTPUT:
+RETVAL





Re: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread will trillich

On Tue, May 01, 2001 at 01:58:56PM -0400, Chris Strom wrote:
   I can't say as I've had any problems using
   err_headers_out-add(Set-Cookie) with any browsers.  I'm 
   surprised to hear that you've had problems with it. 
  
  even DURING a redirect? i seem to have hit a chord here, as
  i'm getting lots of me too in my mailbox.
 
 Even during a redirect.  The following works for me (in a PerlInitHandler
 NOT a PerlAccessHandler) with lynx (2.7) just fine.
 
   $r-err_headers_out-add('Location' = $dest);
   $r-err_headers_out-add('Set-Cookie' = $cookie);
 
   $log-debug(Authentication successful.  Redirecting to $dest);
   return REDIRECT;

okay, i'll try that, too. expectations low, from experience. :/

  something else i'm trying now is
  
  $r-set_handlers(PerlHandler = undef);
  $r-push_handlers( PerlHandler = sub { ...print meta 
  http-equiv...
 
 This ought to work and is a little more conceptually clean that what you
 were trying to accomplish with redirects and printing content in the
 PerlAccessHandler.  Still, my gut feeling is that it's better to move the
 handler up the chain to a PerlInitHandler and do simple redirects there.
 Obviously it's preferable to perform access checks in PerlAccessHandlers,
 but sometimes you do need to set a cookie when doing redirects.

hmm. implying that cookie-setting gets borked in accesshandlers?
(mine sure do.)

  but THIS for some reason redirects the browser back to itself,
  instead of to the login area. the protected area is /protected
  and the login area is /login so the http-equiv tag looks like
  meta http-equiv=Refresh content=0; 
 http://www.fricking-site.com/login;
 but it cycles back to www.cannot-get-in.com/protected instead... !
 
 Are you setting HTTP headers?

% telnet no-way-in-hell-bubba.com 80
Trying ##.##.##.##...
Connected to no-way-in-hell-bubba.com.
Escape character is '^]'.
GET /protected HTTP/1.1
Host: no-way-in-hell-bubba.com

i ask for /protected on lunacy-for-lunch.com server, and get

HTTP/1.1 200 OK
Date: Tue, 01 May 2001 18:33:43 GMT
Server: Apache/1.3.9
Set-Cookie: request_uri=http%3A%2F%2Fno-way-in-hell-bubba.com%2Fprotected; 
domain=.no-way-in-hell-bubba.com; path=/
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1

148
headmeta http-equiv=Refresh content=2; 
http://www.no-way-in-hell-bubba.com/login/;
titleNot logged in/title/head
body bgcolor=white
h1Gotta log in, first/h1
pYou're being redirected to  a

href=http://www.no-way-in-hell-bubba.com/login;http://www.no-way-in-hell-bubba.com/login/a
in just a moment./p
h2Please stand by.../h2
/body/html

from my understanding, which gets shakier by the minute, the
headers and http-equiv are all correct. but lynx and netscape
both bounce like hell right back to /protected ad nauseum.

as if the meta tag was
meta http-equiv=refresh content=2; http://yada-yada.com/protected;
which it's not.

next i'll be taking up russian roulette. (i'll leave one chamber
empty, for sport.)

-- 
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



RE: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread Chris Strom

   headmeta http-equiv=Refresh content=2; 
http://www.no-way-in-hell-bubba.com/login/;

should be:

meta http-equiv=Refresh content=2;
URL=http://www.no-way-in-hell-bubba.com/login/;



modify Server header via a handler

2001-05-01 Thread Richard Chen

I would like to customize or suppress the Server header
from the modperl server responses such as this:

Server: Apache/1.3.19 (Unix) mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6

I thought I could simply set up a Fixup handler to do this:

package NoServerInfo;
use Apache::Constants qw(:common);
sub handler {
my $r=shift;
$r-header_out(Server = 'Foo Bar');
return OK;
}
1;

But this does not seem to work. Is there some kind of restriction
about this particular header in modperl? Without modifying 
the source code, is there a way to customize this Server header field?

Thanks for any info

Richard



RE: modify Server header via a handler

2001-05-01 Thread Geoffrey Young



 -Original Message-
 From: Richard Chen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 01, 2001 2:51 PM
 To: [EMAIL PROTECTED]
 Subject: modify Server header via a handler
 
 
 I would like to customize or suppress the Server header
 from the modperl server responses such as this:

see the ServerTokens directive for toning down the response header.

 
 Server: Apache/1.3.19 (Unix) mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6
 
 I thought I could simply set up a Fixup handler to do this:
 
 package NoServerInfo;
 use Apache::Constants qw(:common);
 sub handler {
 my $r=shift;
 $r-header_out(Server = 'Foo Bar');
 return OK;
 }
 1;
 
 But this does not seem to work. Is there some kind of restriction
 about this particular header in modperl? Without modifying 
 the source code, is there a way to customize this Server header field?

nope... 

there is an archive of a similar discussion if you look back a year or so.

changing the Apache source code for this isn't too hard.  Whether you want
to do this (and ignore your proper Apache/mod_perl roots) is another matter
;)

--Geoff

 



Re: modify Server header via a handler

2001-05-01 Thread newsreader

randal s. posted a way to do that
sometime back.  search for it in
the archive.  his stonehenge
website apparently uses the same trick.

On Tue, May 01, 2001 at 02:51:14PM -0400, Richard Chen wrote:
 I would like to customize or suppress the Server header
 from the modperl server responses such as this:
 
 Server: Apache/1.3.19 (Unix) mod_perl/1.25 mod_ssl/2.8.1 OpenSSL/0.9.6
 
 I thought I could simply set up a Fixup handler to do this:
 
 package NoServerInfo;
 use Apache::Constants qw(:common);
 sub handler {
 my $r=shift;
 $r-header_out(Server = 'Foo Bar');
 return OK;
 }
 1;
 
 But this does not seem to work. Is there some kind of restriction
 about this particular header in modperl? Without modifying 
 the source code, is there a way to customize this Server header field?
 
 Thanks for any info
 
 Richard



Re: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread will trillich

On Tue, May 01, 2001 at 02:49:05PM -0400, Chris Strom wrote:
  headmeta http-equiv=Refresh content=2; 
 http://www.no-way-in-hell-bubba.com/login/;
 
 should be:
 
 meta http-equiv=Refresh content=2;
 URL=http://www.no-way-in-hell-bubba.com/login/;

tolja my understanding was questionable. that helped that part,
at least... much thanks!

so now i feel like i've got one brick done, only forty-nine
thousand, nine hundred ninety-nine to go.

(union break time.)

-- 
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: modify Server header via a handler

2001-05-01 Thread Randal L. Schwartz

 newsreader == newsreader  [EMAIL PROTECTED] writes:

newsreader randal s. posted a way to do that
newsreader sometime back.  search for it in
newsreader the archive.  his stonehenge
newsreader website apparently uses the same trick.

If he's already doing it in the fixup phase, that's where I'm doing it
too, so that's probably not going to work.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Need help installing on Win32...

2001-05-01 Thread Carey Burgess



Ok... I got it installed right now. The PATH was in there, but it was wrong 
for some reason. After I got that straightened out, installing through PPM 
worked like a charm.

Now, how do I get it to work right? I added to httpd.conf like so:

LoadModule perl_module modules/mod_perl.so
#
# (Other stuff here...)
#
Files ~ \.(pl|cgi)$
SetHandler  perl-script
PerlHandler Apache::Registry
Options +ExecCGI
/Files
#
# (Other stuff here...)
#
Alias /cgi-bin/ D:/serv/cgi-bin/
Location /cgi-bin
SetHandler  perl-script
PerlHandler Apache::Registry
Options +ExecCGI
/Location
---
So, I know the handler is now the perl module.

But, I run into a problem at this point... Every time I run a script at all, 
I get one of those 'illegal error' windows for Apache and it shuts down the 
server alltogether. When reading the 'Details' portion of the error window, 
it says APACHE caused an invalid page fault in module MOD_PERL.SO at 
015f:100097bc.

I've tried getting rid of the 'Files' one and just leave the 'Location'
one, as well as the other way around. I got rid of both and it just executed 
through the Shebang line like it normally did before.

It does this every time without fail... Have any ideas as to why and how I 
can fix it?

Well, thanks again for your help!


Carey


P.S. I was asked if I installed perhaps the wrong version. No, I installed 
the right version (I just double and triple checked everything). So, that's 
not it. Thanks to all!





Original Message Follows
From: Randy Kobes [EMAIL PROTECTED]
To: Carey Burgess [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: Need help installing on Win32...
Date: Sun, 29 Apr 2001 21:22:01 -0500 (CDT)

On Sun, 29 Apr 2001, Carey Burgess wrote:

Yeah, I have ActivePerl.

So... I tried installing it using PPM... Well, here's a snippet of what
happened:


PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM install
http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl-1.25_1.3.19.ppd
Install package
'http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl-1.25_1.3.19.ppd?'
  (y/N):
y
Installing package
'http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl-1.25_1.3.19.ppd'...
Writing D:\serv\lang\site\lib\auto\mod_perl\.packlist

If it reaches this point, it means that the necessary files
are installed in the perl tree - if you do at a DOS prompt
 perl -Mmod_perl -e print 1
and not get an error, it means that this part is OK.

Cannot find file 'perl' (or one of its components). Check to
ensure the path and filename are correct and that all required
libraries are available.
Cannot find file 'perl' (or one of its components). Check to
ensure the path and filename are correct and that all required
libraries are available.

Here it's trying to run a post-install script to install the
mod_perl dll (mod_perl.so) into your Apache modules/ directory.
For some reason it can't find your perl binary to run the
script - I assume perl is in your PATH? If so, you can do this
manually - get x86/mod_perl-1.25_1.3.19.tar.gz from the site
you got the ppd file, unpack it, and manually copy mod_perl.so
to your Apache modules/ directory.

best regards,
randy
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: forbidden vs. cookie

2001-05-01 Thread Issac Goldstand

I did this in a module of mine.  I simply did a new Apache::Cookie and
 $cookie-bake() followed by
 $r-header_out(Location=http://go.here/now;);
 return HTTP_MOVED_TEMPORARILY;

I chose TEMP_REDIRECT as I think it's befitting as the above is (also) from
an AuthenHandler and therefore constitute a problem that's not based on the
content of that specific URI...

Anyway, hope this helps.

   Issac

- Original Message -
From: will trillich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 30, 2001 9:31 PM
Subject: forbidden vs. cookie


 i could really use some dumbed-down tips on setting cookies
 during a redirect. boy, this is really getting to me.

 using apache 1.3.9 on debian 2.2/potato

 in trying to implement the concept of the Apache::Ticket*.pm
 modules from the Apache Modules (eagle) book in chapter 6
 (on pages 304+) i'm running into browser compatibility problems.
 SOME browsers (differs among platforms, too) see the forbidden or
 redirect codes and take action immediately, ignoring any
 set-cookie headers that are also sent.

 as a workaround, i was trying to change TicketAccess.pm to

 # the munged version trying to accomodate rude browsers:
 package Apache::TicketAccess;

 use strict;
 use Apache::Constants qw(OK FORBIDDEN REDIRECT);
 use Apache::TicketTool ();

 sub handler {
 my $r = shift;
 my $ticketTool = Apache::TicketTool-new($r);
 my($result, $msg) = $ticketTool-verify_ticket($r);
 unless ($result) {
 $r-log_reason($msg, $r-filename);
 my $cookie = $ticketTool-make_return_address($r);

 #the original code that works for SOME browsers:
 # $r-err_headers_out-add('Set-Cookie' = $cookie);
 # return FORBIDDEN;

 my $login_uri = $r-dir_config(TicketLogin);

 # as AccessHandler, this was very much a bad idea:
 # use CGI '-autoload';
 # print
 # header(-refresh = 1; URL=$login_uri, -cookie = $cookie),
 # start_html(-title = 'Redirecting to login', -bgcolor = 'white'),
 # h1('Gotta log in, first'),
 # p(You're being redirected to ,
 # a({-href=$login_uri},$login_uri),
 #  in just a moment.),
 # h2(Please stand by...),
 # end_html();
 # return OK;
 # it does manage to redirect the browser but there's lots
 # of duplicated headers and garbage (plus just hitting the
 # BACK button bypassed the need to log in)

 # this don't work so not, neither:
 $r-header_out(-cookie=$cookie);
 $r-header_out(-location=$login_uri);
 return REDIRECT;
 # neither header is sent.

 }
 return OK;
 }

 1;
 __END__

 i've spent hours flipping back and from from the index to the
 text, slapping postit notes on every other page, scanning
 Apache::*.pm source code -- and it's still not sinking in... a
 little help would be appreciated!

 AAUGH!

 --
 [EMAIL PROTECTED]





Re: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread will trillich

On Tue, May 01, 2001 at 01:39:13PM -0500, will trillich wrote:
 On Tue, May 01, 2001 at 01:58:56PM -0400, Chris Strom wrote:
  Even during a redirect.  The following works for me (in a PerlInitHandler
  NOT a PerlAccessHandler) with lynx (2.7) just fine.
  
$r-err_headers_out-add('Location' = $dest);
$r-err_headers_out-add('Set-Cookie' = $cookie);
  
$log-debug(Authentication successful.  Redirecting to $dest);
return REDIRECT;
 
 okay, i'll try that, too. expectations low, from experience. :/

it's doing what it's supposed to do, i think.

guess what -- new speed bump. (color me surprised.)

now when lynx or netscape (but not konqueror) get validated, and
the server tries to redirect the browser back to the original
URL, the browsers seem to have cached the /login page as if it
were the /protected page.

so i'm trying

Pragma: no-cache

to no effect. anybody got any other ideas?

-- 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: modify Server header via a handler

2001-05-01 Thread will trillich

On Tue, May 01, 2001 at 12:10:34PM -0700, Randal L. Schwartz wrote:
  newsreader == newsreader  [EMAIL PROTECTED] writes:
 
 newsreader randal s. posted a way to do that
 newsreader sometime back.  search for it in
 newsreader the archive.  his stonehenge
 newsreader website apparently uses the same trick.
 
 If he's already doing it in the fixup phase, that's where I'm doing it
 too, so that's probably not going to work.

is it actually possible via perl?

according to doug at
http://www.geocrawler.com/archives/3/182/1997/6/0/1014229/
we shouldn't get our hopes up.

-- 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread darren chamberlain

will trillich ([EMAIL PROTECTED]) said something to this effect on 05/01/2001:
 now when lynx or netscape (but not konqueror) get validated, and
 the server tries to redirect the browser back to the original
 URL, the browsers seem to have cached the /login page as if it
 were the /protected page.
 
 so i'm trying
 
   Pragma: no-cache
 
 to no effect. anybody got any other ideas?

Does 
http://thingy.kcilink.com/modperlguide/snippets/Cache_Control_for_Regular_and_Er.html
help you?

(darren)

-- 
I don't want Perl to be beautiful, I want you to write beautiful
programs in Perl.
-- Larry Wall



RE: PerlAccessHandler -- struggling and drowning

2001-05-01 Thread Geoffrey Young



 -Original Message-
 From: will trillich [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 01, 2001 3:38 PM
 To: [EMAIL PROTECTED]
 Subject: Re: PerlAccessHandler -- struggling and drowning
 
 
 
 now when lynx or netscape (but not konqueror) get validated, and
 the server tries to redirect the browser back to the original
 URL, the browsers seem to have cached the /login page as if it
 were the /protected page.
 
 so i'm trying
 
   Pragma: no-cache

no-cache headers _should_ have no effect on anything other than a sucessful
response.

http://www.mail-archive.com/dev@perl.apache.org/msg00081.html

--Geoff



Re: cookies work for some browsers, not for others... ?

2001-05-01 Thread putter

will trillich([EMAIL PROTECTED])@Sat, Apr 28, 2001 at 02:44:29PM -0500:
 i've been tinkering with the modperl book examples
 for Apache::Ticket*.pm (as described p305-322)...
 
 it works for
   linux/konqueror
   linux/netscape
   win/explorer
 
 it doesn't work for
   linux/lynx
   mac/netscape

Dude you forgot excellent links browser - text mode and support for tables  frames!
pavel



ApacheCon Europe 2001: Call for Participation (fwd)

2001-05-01 Thread Stas Bekman

FYI:

mod_perl speakers, please submit your proposals en masse!

-- Forwarded message --
Date: Tue, 01 May 2001 17:13:51 -0400
From: Rodent of Unusual Size [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
 [EMAIL PROTECTED], [EMAIL PROTECTED]
Newsgroups: comp.infosystems.www.servers.unix,
comp.infosystems.www.servers.ms-windows,
comp.infosystems.www.servers.misc, de.comm.infosystems.www.servers
Subject: ApacheCon Europe 2001: Call for Participation

-BEGIN PGP SIGNED MESSAGE-

Call for Participation: ApacheCon Europe 2001
=
October 15-17, 2001, Dublin, Ireland

SUBMISSION DEADLINE: Friday, 2 June 2001, 21:00 GMT  [+0100]


Come share your knowledge of Apache software at this
educational and fun-filled gathering of Apache users,
vendors, and friends.

Apache Software Foundation members are designing the technical
program for ApacheCon Europe 2001 that will include three
tracks and over 40 sessions planned.

We are particularly interested in session proposals covering:

o Apache Web server topics (installation, compilation,
  configuration)
o All Apache Software Foundation projects (Jakarta, mod_perl,
  Xerces, et cetera)
o scripting languages and dynamic content
  (Java, PHP, Perl, TCL, Python, XML, XSL, etc.)
o Security and eCommerce
o Performance tuning, load balancing, high availability
o tips for writing Apache Web server modules
o Technical and non-technical case studies
o new Web-related technologies

Only educational sessions related to projects of the Apache
Software Foundation or the Web in general will be considered
(commercial sales or marketing presentation won't be accepted;
please contact [EMAIL PROTECTED] should you be interested in
giving a vendor presentation).

If you would like to be a speaker at the ApacheCon Europe 2001
event, please go to the ApacheCon Web site, log in, and choose
the 'Submit a CFP' option from the list there:

 http://ApacheCon.Com/html/login.html

NOTE: If you were a speaker or delegate at a past ApacheCon,
please log in using the email address you used before; this
will remember your information and pre-load the CFP form for
you.  If this is your first time being involved with ApacheCon,
please create a new account.

Acceptance notification by: Monday, 11 June 2001
- --
#kenP-)}

Ken Coarhttp://Golux.Com/coar/
Apache Software Foundation  http://www.apache.org/
Apache Server for Dummies http://Apache-Server.Com/
Apache Server Unleashed   http://ApacheUnleashed.Com/

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com

iQCVAwUBOu8Zs5rNPMCpn3XdAQF81gQA1L+18aHZIMlnzDiMczsPUccJ6qgarYZj
vPzUiVqZHNronFOwIiRk/UWB9yVT3dxWYvmsXqXAk2A5GzWCKkSLXPV0xOmLaQ+x
SS2N26NPhYY5JCK6+CHk2fK07+uJWTl0a/TGgCAhsotC3LlQOVXffHSs8pPT5zZx
ggDFZUQjB3w=
=S8Vz
-END PGP SIGNATURE-

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




Re: Need help installing on Win32...

2001-05-01 Thread Randy Kobes


On Tue, 1 May 2001, Carey Burgess wrote:

 
 Now, how do I get it to work right? I added to httpd.conf like so:
 
 LoadModule perl_module modules/mod_perl.so
 #
 # (Other stuff here...)
 #
 Files ~ \.(pl|cgi)$
 SetHandler  perl-script
 PerlHandler Apache::Registry
 Options +ExecCGI
 /Files
 #
 # (Other stuff here...)
 #
 Alias /cgi-bin/ D:/serv/cgi-bin/
 Location /cgi-bin
 SetHandler  perl-script
 PerlHandler Apache::Registry
 Options +ExecCGI
 /Location
 ---
 So, I know the handler is now the perl module.
 
 But, I run into a problem at this point... Every time I run a script at all, 
 I get one of those 'illegal error' windows for Apache and it shuts down the 
 server alltogether. When reading the 'Details' portion of the error window, 
 it says APACHE caused an invalid page fault in module MOD_PERL.SO at 
 015f:100097bc.
 

This type of error could result from trying to load a
library with some version or compilation incompatibility.
Is the perl binary in your PATH that of ActivePerl 6xx?
With this same perl, can you run vanilla cgi scripts OK?

best regards,
randy kobes





glimmer of hope -- cookies: www.host.tld vs host.tld

2001-05-01 Thread will trillich

Aha. I found a chink. I still only have one brick in the wall,
but now it seems like i may have a clue as to why the other
bricks have been sitting there, giggling.

to wit:

Cookies are restricted to certain domains, for security reasons.
(Why have a microsoft.com cookie sent to debian.org, right?)
So all cookies need

domain=box.subnet.intralan.organization.tld

Or at the very least, two segments thereof:

domain=.org.tld

Which would be sent to any of these hosts:

www.org.tld
some.obscure.server.org.tld
even.here.org.tld

BUT NOT TO

ord.tlg

Thank you very four-borking-days-lost-forever much.

So, patient gurus laughing-up-your-sleeves, who've known this
from the beginning and have only been waiting for grashopper to
come to the epiphany on his own, would you mind sharing with us
lesser folk... HOW to have cookies work for bare-domain hosts
such as

this.org
something.net
my.tld

to operate as aliases for more specific-style sites such as

www.this.org
www.something.net
a.very.deep.and.remote.server.my.tld

? Please?

at least i'm off the russian roulette kick. for now.

-- 
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



cvs commit: modperl-site index.html

2001-05-01 Thread dougm

dougm   01/05/01 08:41:01

  Modified:.index.html
  Log:
  add mod_perl Pocket Reference book
  
  Revision  ChangesPath
  1.75  +6 -0  modperl-site/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/index.html,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- index.html2001/05/01 10:07:26 1.74
  +++ index.html2001/05/01 15:41:00 1.75
  @@ -278,6 +278,12 @@
brbr
/li 
   
  +li 
  +  a href=http://www.oreilly.com/catalog/modperlpr/;mod_perl
  +   Pocket Reference/a book by Andrew Ford
  +brbr
  +/li 
  +
li 
  Start learning mod_perl with a href=guide/the mod_perl
Guide/a by Stas Bekman.
  
  
  



cvs commit: modperl Changes Makefile.PL

2001-05-01 Thread dougm

dougm   01/05/01 10:08:25

  Modified:.Changes Makefile.PL
  Log:
  fix 'make offsite-tar'
  
  Revision  ChangesPath
  1.590 +2 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.589
  retrieving revision 1.590
  diff -u -r1.589 -r1.590
  --- Changes   2001/04/27 17:01:53 1.589
  +++ Changes   2001/05/01 17:08:25 1.590
  @@ -10,6 +10,8 @@
   
   =item 1.25_01-dev
   
  +fix 'make offsite-tar' [Geoffrey Young [EMAIL PROTECTED]]
  +
   win32 fixes [Randy Kobes [EMAIL PROTECTED]]
   
   fix double-loading bug of Perl{Require,Module}s at startup time
  
  
  
  1.184 +7 -3  modperl/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl/Makefile.PL,v
  retrieving revision 1.183
  retrieving revision 1.184
  diff -u -r1.183 -r1.184
  --- Makefile.PL   2001/04/27 17:01:53 1.183
  +++ Makefile.PL   2001/05/01 17:08:25 1.184
  @@ -1390,13 +1390,17 @@
   
   offsite-tar:
$(CP) MANIFEST MANIFEST.orig
  - $(PERL) -e 'for ($(APACHE_SRC)/*.h) {' \
  - -e 'system $(CP) $$_ src/;' \
  + echo src/Makefile.config  MANIFEST
  + $(CP) $(APACHE_SRC)/Makefile.config src/Makefile.config
  + mkdir src/include
  + $(PERL) -e 'for ($(APACHE_SRC)/include/*.h) {' \
  + -e 'system $(CP) $$_ src/include/;' \
-e 's,^$(APACHE_SRC),,;' \
-e 'system echo src$$_  MANIFEST;' \
-e '}' 
$(MAKE) dist
  - $(RM_F) src/*.h
  + $(RM_RF) src/include/
  + $(RM) src/Makefile.config
$(MV) MANIFEST.orig MANIFEST
   
   EOF
  
  
  



cvs commit: modperl/t/net/perl api.pl

2001-05-01 Thread dougm

dougm   01/05/01 10:28:43

  Modified:.Changes ToDo
   Apache   Apache.pm
   src/modules/perl Apache.xs
   t/net/perl api.pl
  Log:
  add $r-allowed method
  
  Revision  ChangesPath
  1.591 +2 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.590
  retrieving revision 1.591
  diff -u -r1.590 -r1.591
  --- Changes   2001/05/01 17:08:25 1.590
  +++ Changes   2001/05/01 17:28:28 1.591
  @@ -10,6 +10,8 @@
   
   =item 1.25_01-dev
   
  +add $r-allowed method [Philippe Troin [EMAIL PROTECTED]]
  +
   fix 'make offsite-tar' [Geoffrey Young [EMAIL PROTECTED]]
   
   win32 fixes [Randy Kobes [EMAIL PROTECTED]]
  
  
  
  1.281 +0 -3  modperl/ToDo
  
  Index: ToDo
  ===
  RCS file: /home/cvs/modperl/ToDo,v
  retrieving revision 1.280
  retrieving revision 1.281
  diff -u -r1.280 -r1.281
  --- ToDo  2001/04/27 17:01:54 1.280
  +++ ToDo  2001/05/01 17:28:29 1.281
  @@ -7,9 +7,6 @@
   
   - PERL5LIB foo
   
  -- From: Daniel Jacobowitz [EMAIL PROTECTED]
  -  Subject: New method $req-allowed() for libapache-mod-perl
  -
   - From: Dave Rolsky [EMAIL PROTECTED]
 Subject: Apache::test patch
   
  
  
  
  1.64  +12 -0 modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- Apache.pm 2001/04/26 05:30:45 1.63
  +++ Apache.pm 2001/05/01 17:28:34 1.64
  @@ -272,6 +272,18 @@
   Returns true if the current request is the first internal request,
   returns false if the request is a sub-request or internal redirect.
   
  +=item $r-allowed($bitmask)
  +
  +Get or set the allowed methods bitmask. This allowed bitmask should be
  +set whenever a 405 (method not allowed) or 501 (method not implemented)
  +answer is returned. The bit corresponding to the method number should be
  +et.
  +
  +   unless ($r-method_number == M_GET) {
  + $r-allowed($r-allowed | (1M_GET) | (1M_HEAD) | (1M_OPTIONS));
  + return HTTP_METHOD_NOT_ALLOWED;
  +   }
  +
   =back
   
   =head1 SUB REQUESTS
  
  
  
  1.121 +10 -0 modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- Apache.xs 2001/04/17 21:57:20 1.120
  +++ Apache.xs 2001/05/01 17:28:37 1.121
  @@ -1510,6 +1510,16 @@
   OUTPUT:
   RETVAL
   
  +int
  +allowed(r, ...)
  +Apache   r
  +
  +CODE:
  +get_set_IV(r-allowed);
  +
  +OUTPUT:
  +RETVAL
  +
   time_t
   request_time(r)
   Apache   r
  
  
  
  1.45  +8 -2  modperl/t/net/perl/api.pl
  
  Index: api.pl
  ===
  RCS file: /home/cvs/modperl/t/net/perl/api.pl,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- api.pl2001/01/26 18:37:46 1.44
  +++ api.pl2001/05/01 17:28:41 1.45
  @@ -1,5 +1,5 @@
   use Apache ();
  -use Apache::Constants qw(:server :common);
  +use Apache::Constants qw(:server :common :methods);
   use Apache::test;
   use strict;
   
  @@ -16,7 +16,7 @@
   
   my $is_xs = ($r-uri =~ /_xs/);
   
  -my $tests = 71;
  +my $tests = 74;
   my $is_win32 = WIN32;
   $tests += 2 unless $is_win32;
   my $test_get_set = Apache-can('set_handlers')  ($tests += 4);
  @@ -156,6 +156,12 @@
   #just make sure we can actually call these
   test ++$i, $r-satisfies || 1;
   test ++$i, $r-some_auth_required || 1;
  +
  +$r-allowed(1  M_GET);
  +test ++$i, $r-allowed  (1  M_GET);
  +test ++$i, ! ($r-allowed  (1  M_PUT));
  +$r-allowed($r-allowed | (1  M_PUT));
  +test ++$i, $r-allowed  (1  M_PUT);
   
   #dir_config