Re: Basic authentication

2003-09-16 Thread Geoffrey Young
Stephen Hardisty wrote: Hi, I'm having a bit of trouble authenticating users. The script I have works, but only a couple of times before it just sends out 401 without prompting the user for their details. We have mod_perl 1.99_05 installed, we don't want to upgrade as we would have more

[ANNOUNCE] Apache::IncludeHook

2003-09-15 Thread Geoffrey Young
methods of sending content to the client still need to be implemented. AUTHOR Geoffrey Young Elt[EMAIL PROTECTED]gt COPYRIGHT Copyright (c) 2003, Geoffrey Young All rights reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

Re: Custom Log files Under MP2

2003-09-11 Thread Geoffrey Young
might also help. --Geoff Thanks! -TO --- Geoffrey Young [EMAIL PROTECTED] wrote: Tofu Optimist wrote: I would like to append a small line of log information to a file on certain apache2 requests. For this application, I am very concerned about speed, so i'm looking for fast simple

Re: Can't build Apache::Dispatch on Windows / Perl 5.8.0

2003-09-11 Thread Geoffrey Young
The problem you described before with the missing symbols can be resolved by linking against the mod_perl.lib built when you build mod_perl.so. This can be done by adding in a LIBS attribute to WriteMakefile() in Makefile.PL with a value of ' -L/Path/to/mod_perl_lib -lmod_perl'. ah, right.

Re: Sending a different protocol header

2003-09-08 Thread Geoffrey Young
Hans wrote: I've done a fair amount of searching and still can not find an answer to this. I'm writing a mod_perl2 handler and would like to output my own headers. Specifically I'd like to output headers like this: - ICY 200 OK icy-notice1: some info icy-name: some

Re: Sending a different protocol header

2003-09-08 Thread Geoffrey Young
assbackwards works. Thanks! When I first read your response about a method called assbackwards I thought it was sarcasm :) understandable :) actually, the assbackwards slot of the request record is there to indicate that the incoming request used HTTP/0.9, which defines only GET and where no

Re: Sending a different protocol header

2003-09-08 Thread Geoffrey Young
Perrin Harkins wrote: On Mon, 2003-09-08 at 13:12, Geoffrey Young wrote: actually, the assbackwards slot of the request record is there to indicate that the incoming request used HTTP/0.9, which defines only GET and where no headers are expected in the response. Clearly this works

Re: SubRequest in Filter MP2 [QUESTION]

2003-09-05 Thread Geoffrey Young
Craig Shelley wrote: Hello again.. On Thu, 2003-09-04 at 14:21, Geoffrey Young wrote: see Apache::SSI for mp1 - it does exactly what you are trying to do and is subclassable, so you can add your own tags/functionality if you want. That is exactly what I am already doing. When using #exec

Re: $r-headers_out Location and Set-Cookie

2003-09-05 Thread Geoffrey Young
Michael wrote: On Wed, Sep 03, 2003 at 09:42:00, Garrett Goebel said... And gives the following recipe: Example A-3. redirect_cookie.pl use Apache::Constants qw(REDIRECT OK); my $r = shift; # prepare the cookie in $cookie $r-err_headers_out-add('Set-Cookie' = $cookie);

Re: FW: $r-headers_out Location and Set-Cookie

2003-09-04 Thread Geoffrey Young
Garrett Goebel wrote: [Note: reposting, the original post appears to have dropped through the cracks] not only did I get two of these already, but I also posted a reply :) --Geoff -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html

Re: Can't get a mod_perl.so...

2003-09-04 Thread Geoffrey Young
I still don't have a mod_perl.so. There are no errors anywhere. I'm using mod_perl 1.28 source. I'm running Apache 1.3.26 on Linux 2.4.18 (Slackware 8). you only get a shared object file if you compile mod_perl as a DSO, which is not the default with mod_perl 1.28. to check whether mod_perl

Re: Can't get a mod_perl.so...

2003-09-04 Thread Geoffrey Young
perl Makefile.PL APACHE_SRC=../apache_1.3.26_modperl/ APACHE_PREFIX=/usr/local/apache EVERYTHING=1 USE_DSO=1 USE_APACI=1 APACI_ARGS='--enable-module=rewrite, --enable-module=info, --enable-module=expires, --disable-module=userdir' DO_HTTPD=1 when I use those options, I end up with

Re: $r-headers_out Location and Set-Cookie

2003-09-03 Thread Geoffrey Young
Garrett Goebel wrote: Geoffrey Young wrote: That's when you use Apache::compat, doing the mp1 syntax. In mp2-speak that would be: $r-err_headers_out-add('Set-Cookie' = $packed_cookie); $r-headers_out-set('Location' = $url); $r-status(REDIRECT); notice that you don't

Re: Custom Log files Under MP2

2003-09-02 Thread Geoffrey Young
Tofu Optimist wrote: I would like to append a small line of log information to a file on certain apache2 requests. For this application, I am very concerned about speed, so i'm looking for fast simple solutions. if speed is the concern, just stick to apache's native logging mechanism. see

Re: [mp1] consistent segfaults with HTML::Mason

2003-08-28 Thread Geoffrey Young
Stephen wrote: Stephen [EMAIL PROTECTED] wrote: I'm no expert at debugging C, but I dont think that the above looks too healthy Well, I think I have it figured out, more or less. The root cause of it seemed to be a rather, um, interesting bit of code in HTML::Mason::ApacheHandler which

Re: SubRequest in Filter MP2 [QUESTION]

2003-08-27 Thread Geoffrey Young
Craig Shelley wrote: MP_AP_PREFIX = /home/craig/temp/mod_perl-1.99_09/ hi craig. before we continue, please try the latest cvs (without the patch I sent) and see if your stuff segfaults there. if not, at least we know we've isolated the segfault and just have bad logic to fix :) if

Re: problems with Apache::Filter

2003-08-27 Thread Geoffrey Young
Stas Bekman wrote: Josh Chamas wrote: Right, so basically either Apache::Filter Apache::SSI need to be ported to mod_perl 2, IMHO, Apache::Filter does doesn't need to be ported to mp2. You have a native API for filtering. Geoff has posted a an alpha-port of Apache::SSI to the list some

Re: SubRequest in Filter MP2 [QUESTION]

2003-08-27 Thread Geoffrey Young
however, removing that logic causes api/lookup_uri2.t to fail, but I suspect this is an issue with puts() rather than the subrequest mechanism - changing puts() to print() makes everything work just fine. does puts() write directly to the wire, bypassing filters? Sorry, but that's cheating

Re: SubRequest in Filter MP2 [QUESTION]

2003-08-26 Thread Geoffrey Young
Stas Bekman wrote: Craig Shelley wrote: I'll take a look at it. But you didn't supply a complete bug report as explained http://perl.apache.org/bugs/. Please do so. I think I've got this figured out. the problem is with the r-main logic in mpxs_ap_run_sub_req. with that logic, what ends up

Re: SubRequest in Filter MP2 [QUESTION]

2003-08-25 Thread Geoffrey Young
my $rr = $f-r-lookup_uri(subrequest.txt); #$rr-run; For some reason, the server segfaults when the above code is run (with the $rr-run line present) does anything change if you use $rr = $f-$r-lookup_uri(subrequest.txt, $f-next); ? --Geoff -- Reporting bugs:

Re: unsetting PerlTransHandler

2003-08-14 Thread Geoffrey Young
Frank Maas wrote: On Thu, Aug 14, 2003 at 11:07:13AM -0400, Geoffrey Young wrote: There is actually a Location/LocationMatch sequence performed just before the name translation phase (where Aliases and DocumentRoots are used to map URLs to filenames). The results of this sequence

Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Geoffrey Young
Xavier Noria wrote: [EMAIL PROTECTED] wrote: It seems to me that $r-content-type is for what your server sends to the client, which is probably undef in the Fixup stage, where you test it. You probaly meant to test for the $ct = $r-header_in(Content-type) if you wanted to see whats requested

Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Geoffrey Young
sub handler { my $r = shift; return DECLINED if $r-content_type ne 'text/html'; return SERVER_ERROR unless $r-can_stack_handlers; $r-set_handlers(PerlHandler = ['ContentHandler']); return OK; } What am I missing? unlike the other phases of the

Re: unsetting PerlTransHandler

2003-08-14 Thread Geoffrey Young
Yes, I've implemented it also that way. But I thought Location acts on the URI and in principle there can be a Location-specific transhandler. I'm wondering why it is impossible? trans handlers are used to map the URI to a filename, the result of which lets Apache know to which Directory the

Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Geoffrey Young
Bruce Tennant wrote: I'm trying to do some development work with mod_perl and find restarting the server a pain. So I setup Apache::Reload, but it doesn't seem to want to see my local devel directory all the time. Here's my settings Apache/2.0.40 mod_perl-1.99_7 please upgrade to the latest CVS

Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Geoffrey Young
Here's my perl.conf (sourced by httpd.conf) start LoadModule perl_module modules/mod_perl.so PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myff on second thought, try PerlSwitches -I/home/bruce/public_html/ffball/myff or PerlSwitches

Re: unsetting PerlTransHandler

2003-08-14 Thread Geoffrey Young
I understand translation handlers cannot be Directory-specific. But Location directives apply before any translation handler is called (see below). yes they do, but not really. to really understand this, see http://httpd.apache.org/docs/sections.html specifically, There is actually a

Re: request for help with reproducing problem

2003-08-14 Thread Geoffrey Young
But you really want to learn how to write tests with Apache::Test if you do any serious mod_perl development, so there is no excuse not to learn Apache::Test, not talking about the fact that there are hundreds of existing tests as examples, the tutorial

Re: Mod_perl how to include the result of mod_autoindex?

2003-08-14 Thread Geoffrey Young
Thomas Klausner wrote: Hi! On Mon, Aug 11, 2003 at 04:37:45 -0500, Slava Bizyayev wrote: It's not quite the truth... You can do all that staff on Apache 1.3 with appropriate skills. See LWP for example. If you mean to grab the output of e.g. mod_autoindex by issueing a sperate request using

Re: $r-headers_out Location and Set-Cookie

2003-08-11 Thread Geoffrey Young
That's when you use Apache::compat, doing the mp1 syntax. In mp2-speak that would be: $r-err_headers_out-add('Set-Cookie' = $packed_cookie); $r-headers_out-set('Location' = $url); $r-status(REDIRECT); notice that you don't need to call $r-send_http_header, it doesn't exist in mp2. not to

Re: help on setting up a PerlFixupHandler

2003-08-09 Thread Geoffrey Young
So, while I'm not 100% sure about this, logically the $r-content_type should be empty before the response is prepared to be sent to the browser, so it should be empty in the Fixup stage. not necessarily. if you request index.html, mod_mime (at the mime-type phase) will set the content type to

Re: the installation nightmare continues

2003-08-06 Thread Geoffrey Young
So I built, tested and made apache with: $ ./configure --prefix=/usr/local/apache $ make $ make install $ usr/locall/apache/bin/apachectl start (started fine) try letting mod_perl do the heavy lifting - mod_perl will build both itself and apache if you let it. after unzipping both apache and

Re: handlers versus scripts, SSI difference

2003-08-04 Thread Geoffrey Young
But it seems to be that with modperl as DSO this directive does not work, and that Apache::include is only a modperl1.x funcionality, so discarted in mod perl 2. I've started this port, but it's a long way from being completed - it doesn't work right and dumps core, but I haven't looked at it

Re: rflush() not working as documented?

2003-08-04 Thread Geoffrey Young
Martin Wickman wrote: Just checking that this did not get lost on the way. Anyone care to give me a hint? On Thu, Jul 31, 2003 at 10:17:06PM +0200, Martin Wickman wrote: Hello According to docs[1], $r-rflush() should create a new brigade with data. It does not. I've seen this also, but was

Re: PerlTransHandler headaches

2003-07-30 Thread Geoffrey Young
Glenn E. Bailey III wrote: Hello, While I am not new to Perl, I am completely new to mod_perl. check out the resources at http://perl.apache.org/ - there's lots of good information there :) sub handler { my $r = shift; return OK; } 1; And not matter what I always get a 404 with

Re: PerlTransHandler headaches

2003-07-30 Thread Geoffrey Young
: so, the general rule for PerlTransHandlers is to return : DECLINED unless you : set $r-filename. What I am trying to do is just test, to make sure it is working ok. So what I did is wrote the following snippit: sub handler { my $r = shift; return DECLINED; } That should still

Re: Life of env vars set using Apache.pm-subprocess_env

2003-07-29 Thread Geoffrey Young
Hari Bhaskaran wrote: Hi, Does apache clear env variables set by $r-subprocess_env() at the end of the request? sort of... Put in another way - Does apache start with a 'clean' environment for every request? that's a more accurate description :) --Geoff

Re: Combining authen-handler with mod_auth

2003-07-14 Thread Geoffrey Young
Instead of trying to cram multiple perl-script into the same Authen phase, which btw could not be done without patching Apache and/or mod_perl, if by perl-script you mean mod_perl handlers, that's not really true. currently, mod_perl will run all configured PerlAuthenHandlers until one

Apache 2.1 Authentication Providers in Perl

2003-07-09 Thread Geoffrey Young
hi all... buried within perl.com this week is my latest article http://www.perl.com/pub/a/2003/07/08/mod_perl.html which covers how to use Apache 2.1 authentication from Perl. one of the biggest benefits of Apache 2.1 auth over Apache 2.0 (or even 1.3) is the ease at which it opens up

Re: Combining authen-handler with mod_auth

2003-07-07 Thread Geoffrey Young
Thanks! I guess that may be possible, but somewhat problematic since I like to stay with the distros apache-version. Btw, I remember seeing something about APR_HOOK_(LAST|FIRST|...) in the docs on perl.apache.org. Not implemented yet? I'm not sure what docs you're thinking about, but that change

Re: Combining authen-handler with mod_auth

2003-07-05 Thread Geoffrey Young
Martin Wickman wrote: Hello The short version: How can I force my mod_perl Authen-handler to run after mod_auth and not before it? in Apache 1.3 you could control this with CleanModuleList/AddModule, but those directives don't exist in 2.0. I think the only way to do it in 2.0 is to change

Re: Apache::Request for CGI? (was: Re: A::Registry vs. mod_perlhandlerphilosophy)

2003-07-02 Thread Geoffrey Young
Jesse Erlbaum wrote: Philippe -- Check out the guide: Check out the books: Check out the success stories: Is that your answer? I was hoping for specific examples, not hand-waving. I like to think that Part III (Chapters 11-17) of the mod_perl Developer's Cookbook does some of that.

Re: Apache::Request for CGI? (was: Re: A::Registry vs. mod_perlhandlerphilosophy)

2003-07-02 Thread Geoffrey Young
It's unclear to me, though, that there are unimaginably cool things you can get to in a real content handler that you can't get to from an Apache::Registry script--which seems to be the assertion. well, if you consider that you still get access to $r and all its treasures from Apache::Registry,

Re: Best compression for mod_perl application?

2003-07-01 Thread Geoffrey Young
The other odd problem I got was that if anywhere in my perl code I printed nothing (e.g. print or $foo=;print $foo), I'd get this error: error: 20014:Error string not specified yet at /my/perl/code.pl line 123 This error was both blurted to the error_log and to the web page (screwing up the

Re: mod_perl And Redirection

2003-06-30 Thread Geoffrey Young
$r-headers_in-unset(Content-length); $r-header_out(Location = $uri); $r-status(REDIRECT); $r-send_http_header; return REDIRECT; well, you shouldn't ever mess with $r-status - that messes up Apache's internal bookkeeping. and don't send headers on an error

Re: dynamic Authentication with PerlHeaderParserHandler?

2003-06-25 Thread Geoffrey Young
Meik Hellmund wrote: I tried to modify the Web agenda/calendar chronos (http://chronoss.sourceforge.net) in such a way that everyone can look at the calendar without authentication but changes need basic authentication. In other words, URLs like http://.../chronos?action=showday;

Re: mod_perl PerlTransHandler weirdness

2003-06-17 Thread Geoffrey Young
Joel Bernstein wrote: Hi, I would not be surprised if this problem has arisen due to me expecting more from Apache+mod_perl than it's capable of. The server is running Apache 1.3.mumble with mod_perl and mod_php. The site has been entirely built in PHP, by somebody else. They want the facility

Re: Can't call method is_initial_req without a package or objectreference at .........

2003-06-17 Thread Geoffrey Young
Martin Moss wrote: All, I'm having some problems with Apache giving me grief, or most probably me getting my knickers in a complete twist. I get the following error:- Can't call method is_initial_req without a package or object reference at . It seems to happen when my URL ends like

Re: getting *any* variables out of the server environment

2003-06-09 Thread Geoffrey Young
Ryan Muldoon wrote: Geoffrey, Thanks for the explanation. Unfortunately, I think I am still a little unclear as to how to proceed. If I understand you correctly, my first method is completely wrongheaded. :) (I tried this because it is how the Writing Apache Modules with Perl and C does

Re: getting *any* variables out of the server environment

2003-06-09 Thread Geoffrey Young
Ok, removed. Thank you very much for the in-depth replies. It is very useful. Unfortunately any variable-reading continues to elude me. But I really appreciate all the help! well, it sounds like you are having a larger problem that just mod_ssl-based variables. since you mention you're

[ANNOUNCE] Practical mod_perl is out!

2003-06-04 Thread Geoffrey Young
well, the (long) wait is now over - Practical mod_perl is here. weighing in at a whopping 924 pages, Practical mod_perl really needs no introduction for those that are already familiar with the mod_perl Guide. however, from the ORA catalog description: From writing and debugging scripts to

Re: [ANNOUNCE] Practical mod_perl is out!

2003-06-04 Thread Geoffrey Young
Frank Maas wrote: well, the (long) wait is now over - Practical mod_perl is here. Geoff, you might be the best person to ask and it might be a worthwhile extension to the mod_perl-documentation: why would one use this new book if (s)he has the mod_perl cookbook already. that's a valid

Re: Stacked Handlers Location directive -- inside and outside virtualhost

2003-05-31 Thread Geoffrey Young
When http://www.abc.com/~xyz gets called PerlAuthenHandler MyModule is invoked. MyModule code checks for IP after reading a file from xyz directory. If the host ip matches with the one in the file, it returns OK and the PerlAuthzHandler never gets called and the webpage is served to the user. you

perl.com: Testing mod_perl 2.0

2003-05-29 Thread Geoffrey Young
for those who haven't already seen it, perl.com ran the second of my series of articles on mod_perl 2.0 late last week. the title is actually a bit decieving. it's about using the Apache-Test testing framework, but although Apache-Test is shown in a mod_perl 2.0 context, Apache-Test can be

Re: [mp2] httpd.conf Perl block problems

2003-05-29 Thread Geoffrey Young
The first bug is a known one: apparently, recent mod_perls are sensitive to the syntax of the Perl tag: they require a space in it, like this: Perl I hope this is just a bug that hasn't risen to the top of the priority list yet, and that the mod_perl folk don't intend to keep this sytax.

Re: [mp1] .htaccess and mod_perl

2003-05-29 Thread Geoffrey Young
Michael L. Artz wrote: I am stuck in an Ensim environment ugh. What is possible within an .htaccess file as far as perl configuration for mod_perl 1? just about anything. I use an Ensim installation, and am constantly frustrated by it. however, there are ways around just about anything.

Re: [mp1] .htaccess and mod_perl

2003-05-29 Thread Geoffrey Young
Apache::StatINC is R.I.P. Use Apache::Reload instead. but Apache::StatINC comes with mp1 and Apache::Reload doesn't - it's difficult to install modules on these ensim boxes since you don't have root (and yes, there are other ways around it of course :) --Geoff

Re: [mp2] httpd.conf Perl block problems

2003-05-29 Thread Geoffrey Young
+use Apache::Const -compile = qw(OK); Without trying it, I'm sure that line will fix the error I'm seeing. I'd try it, but my RH9 box can't be disturbed at the moment. you will find that you need all the lines in that patch to get it to work - the error you are seeing is just masking others

Re: checking what values have been set using pnotes/notes

2003-04-04 Thread Geoffrey Young
Martin Moss wrote: All, Is there a way to work out what values have been set using pnotes/notes, So that a cleanup Handler can dynamically clear the values, rather than only clear ones pre-programmed? both notes and pnotes are guaranteed fresh at the start of each request, so there is no

Re: AuthDBI logoff

2003-03-31 Thread Geoffrey Young
Todd White wrote: if there was a means by which i could strip out the Authorization header in the client request, this would force a 401 response from the server which would also satisfy my specific need. is there a means by which i can manipulate an incoming request header from the client?

Re: gaining access to config directives of other modules

2003-03-29 Thread Geoffrey Young
dorian wrote: i know Apache::Module can get at all the installed modules and their directives, and even the spec of those directives, but what about the actual values of those directives? i notice Apache::Module is old, but i don't see anything else out there that looks like it will come close

Re: mod_perl.pm and Apache 2

2003-03-28 Thread Geoffrey Young
Chris Majewski wrote: OK, I've resolved the mod_perl.pm dependency by reinstalling mod_perl-1.99_08 (from src). But now I get this when trying to install Apache::Cookie Can't locate Apache/MyConfig.pm in @INC (@INC contains: /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib

Re: Content-Type not working on MSIE

2003-03-21 Thread Geoffrey Young
Andrew Ho wrote: Hello, SBCan someone please summarize the problem and add possible solutions and SBpost it here so we can add it to this document: SBhttp://perl.apache.org/docs/tutorials/client/browserbugs/browserbugs.html Sometimes, MSIE will ignore the MIME type specified in a Content-Type

Re: notes() and mod_perl ErrorDocuments

2003-03-20 Thread Geoffrey Young
Hann, Brian wrote: Thanks, that worked. Now I can use the regular authentication stuff. As I said in my last email, in the interest of preventing location pollution, is there some way I could make those PerlSetVars available to subsequent requests to a different location? I can't think of any

Re: notes() and mod_perl ErrorDocuments

2003-03-20 Thread Geoffrey Young
Hann, Brian wrote: Partially, and yes that seems to work. But here's the thing: When a user fails to enter a good password they will be given a chance to enter questions like What is your mother's maiden name, etc. and get their account unlocked. Without passing the enc_key and system_id in

Re: notes() and mod_perl ErrorDocuments

2003-03-19 Thread Geoffrey Young
Hann, Brian wrote: I have a mod_perl handler set as the 401 ErrorDocument for a certain location that requires authentication. I would like to store data in notes() in the first location so that the 401 handler can access them. Is that possible? So far I haven't been able to get it to work.

Re: notes() and mod_perl ErrorDocuments

2003-03-19 Thread Geoffrey Young
Hann, Brian wrote: Actually I think I got it, but thanks for the tip on $r-prev-notes. I'll have to give it a try. And yes, I've been poring over the cookbook for most of the day :) :) Here's what I ended up doing: When I hit a place in my authen module that required me to do:

Re: [mp2] adding SERVER_ROOT and SERVER_ROOT/lib/perl to @INC

2003-03-18 Thread Geoffrey Young
Stas Bekman wrote: Perrin Harkins wrote: Stas Bekman wrote: The question is, do we want to have this feature in mp2? I thought it was cool to have it automatically add a path relative to the server root, because it makes it feel more like you are writing real Apache modules, and not just

Re: Tracing double accesshandler invocation

2003-03-14 Thread Geoffrey Young
Nick Tonkin wrote: Hi Ric, This has been a nightmare trying to debug, but I think I've found where the cause is in my module. In my Access handler I have some code designed to skip Access handling for images (let the html pages take care of that). The code calls $r-lookup_uri to check on the

[ANNOUNCE] Apache::Clean-2.02b

2003-03-07 Thread Geoffrey Young
The URL http://www.modperlcookbook.org/~geoff/modules/Apache-Clean-2.02b.tar.gz has entered CPAN as file: $CPAN/authors/id/G/GE/GEOFF/Apache-Clean-2.02b.tar.gz size: 6334 bytes md5: 55402e3e753599e56a74204b3e8649c6 this is a preliminary port of Apache::Clean over to mod_perl 2.0. in

Re: mod_perl Cookbook example

2003-03-05 Thread Geoffrey Young
ASHISH MUKHERJEE wrote: Hello! I was trying Recipe 11.3 from the mod_perl Cookbook (Cookbook::Timer). Does this measure real download speed or does it merely measure server processing time? well, it measures the time that it takes Apache to complete the response. this is dependent on a

Re: internal_redirect and returns

2003-03-05 Thread Geoffrey Young
[snip] I use this subroutine: sub let_through { my ($self, $r, $p) = @_; $r-set_handlers( PerlAuthzHandler = [\OK] ); $r-set_handlers( PerlAuthenHandler = [\OK] ); $p $r-internal_redirect( $p ); return OK; } And under some circumstances might call:

Re: $r-headers_in-get('Referer') doesn't work with IE

2003-03-04 Thread Geoffrey Young
But with IE 6.0 the $r-uri and $r-headers_in-get('Referer') is different than for NN. as you're seeing, the Referer header is pretty unreliable due to the different ways browsers implement it. you should probably switch to a different method for this, such as specifying the environment

Re: PerlCleanupHandler called from default-handler

2003-03-04 Thread Geoffrey Young
Tom Murphy wrote: I have written a Apache::DBILogger style log mechanism. It is enabled via the perl.conf in the Server context as: PerlCleanupHandler NC::LogHandler It works correctly, except for the fact that request handle by the default-handler do not call this handler. The mod_perl

Re: Override Authentication for one sub directory

2003-03-03 Thread Geoffrey Young
Scott Alexander wrote: Hi, I'm using Apache-AuthCookie-3.04 for authentication I have a protected directory with 10 sub directories, one directory needs to be open to any user. I could write 10 Directory /usr/local/systems/work/directory_1 or use a PERL section in the conf file to create the 10

Re: How to avoid loss of POST data in a good way?

2003-02-28 Thread Geoffrey Young
Frank Maas wrote: Hi, Excuse me for this question that is, without question, due to my newbie- ness, but I am against a wall here. I am creating a website that is running under mod_perl and using several handlers of the chain. The website uses the POST method to send form data. I first used

Re: help with dl_install_.al error please

2003-02-28 Thread Geoffrey Young
Warren Pollans wrote: Hi Folks, I still need help with this. Which module is responsible for putting dl_install_.al in auto/DynaLoader? Dynaloader is there. you might want to ask this question over on [EMAIL PROTECTED], where there are people who specialize in the nuances of OS X.

Re: mod_perl Developer's Cookbook

2003-02-27 Thread Geoffrey Young
[EMAIL PROTECTED] wrote: On 27 Feb 2003 at 11:35, Gazi, Nasser (London) wrote: A question about mod_perl Developer's Cookbook by Young, Lindner and Kobes: Is this book still relevant and worth buying for mod_perl2 ? (I'm about to dive into web development using Apache/mod_perl and intend to go

Re: Authorization question

2003-02-27 Thread Geoffrey Young
Jean-Michel Hiver wrote: On Thu 27-Feb-2003 at 11:39:32AM -, Richard Clarke wrote: I've never had any reason to do this so there might be a shortcut but I think something along the lines of the following should work (As long as your access/auth handler doesnt make use of $r-is_intial_req())

Re: Authorization question

2003-02-27 Thread Geoffrey Young
but DECLINED is almost certainly a bad idea. What was the idea behind return DECLINED if $r-is_inital_req; in auth handlers in the first place? I think it stems from the Eagle book, thus from Doug, but I'm not sure - I can't remember exactly. it was probably an attempt to reduce overhead for

Re: Problem headers_out

2003-02-27 Thread Geoffrey Young
Udlei Nattis wrote: Hi all Why i have problem? $cookie1 = new CGI::Cookie( -name = 'sessid', -value = $session-id()); $r-headers_out-{'Set-Cookie'} = $cookie1; [snip] Can't locate object method STORE via package APR::Table at

Re: subrequest-run() doesn't send HTTP headers

2003-02-26 Thread Geoffrey Young
[EMAIL PROTECTED] wrote: Hello list, i'm trying to run a subrequest from within a mod_perl content handler. The subrequest is build from the request's 'lookup_file()' method. Unfortunately, when i invoke the 'run()' method of the subrequest, no HTTP headers are sent (even so the documentation

Re: subrequest-run() doesn't send HTTP headers

2003-02-26 Thread Geoffrey Young
to alter this behavior, use $sub-run(1). see Recipe 3.16 in the Cookbook whoops, that was supposed to be 3.15. --Geoff

Re: subrequest-run() doesn't send HTTP headers

2003-02-26 Thread Geoffrey Young
subrequests do not include headers, so if you use $sub-run() to send the subrequest to the client you are required to send headers yourself. which i can't, since i have no idea about the mime-type etc. of the file ;-/ yes you do - the subrequest found out for you :)

Re: Redirects: relative vs absolute

2003-02-24 Thread Geoffrey Young
Grant McLean wrote: I've seen a number of code examples for redirects which output a root-relative URI in the Location header. Eg: Location: /images/item1.gif Although browsers seem to accept this and do 'the right thing', the HTTP RFC seems to be pretty clear that the Location header must be

Re: mod_perl 2.0 question about $r-connection-auth_type

2003-02-19 Thread Geoffrey Young
I've just about got the Apache::AuthCookieDBI to work with Apache 2.0.44 mod_perl 1.99_09-dev, but I ran into a problem with the $r-connection object not having auth_type or user defined. The $r-auth_type work just fine. Are these the same reference? What should I look for, or use? [snip]

Re: Trouble using dir_config for PerlSetVar inside Perl section

2003-02-18 Thread Geoffrey Young
Larry Leszczynski wrote: Hi all - I'm having trouble using server-dir_config in my startup.pl to read variables set by PerlSetVar inside a Perl section. I'm using Perl 5.6.1, Apache 1.3.27, and mod_perl 1.27. [snip] and this does not work either: Perl push

Re: Apache::Module installation issues

2003-02-14 Thread Geoffrey Young
dorian wrote: I don't remember what was the outcome of the patch I've posted a long time ago. I sent it after having the same problem. ah, so it's actually a problem with the mod_perl distribution then? well, maybe not. try this patch

Re: cvs commit: modperl-2.0 Changes

2003-02-13 Thread Geoffrey Young
+package Apache::Connection; + +# auth_type and user records don't exist in 2.0 conn_rec struct +# 'PerlOptions +GlobalRequest' is required +sub auth_type { Apache-request-auth_type } +sub user { Apache-request-user } + 1; __END__ I think this may need a bit

Re: source code appears as text listing in browser

2003-02-12 Thread Geoffrey Young
Alois Treindl wrote: I tried to follow instruction in mod_perl developer's cookbook to move exitings CGI script to mod_perl. What happens is that the browser lists the source code of my CGI scripts, instead of excuting them, what this means is that the normal Apache handler that sends

Re: Registry return codes handling (was Re: Possible bug with a 206Partial Response)

2003-02-11 Thread Geoffrey Young
The only thing that puzzles me about this thread is that it seems to be leaning towards the position that says; If the developer just does straight out weird stuff and messes with $r-status in a cgi-script and expects it to work with Apache::Registry (which as far as I understand is a cgi

Re: Registry return codes handling (was Re: Possible bug with a 206Partial Response)

2003-02-11 Thread Geoffrey Young
OK, so we are not done with it. The first thing I'd like to see is to have Apache::Registry and Apache::PerlRun agree on how they handle return codes, because they aren't the same. Once this happens, the Cooker will do the same. As you have mentioned we have a problem with relying on return

Re: Registry return codes handling (was Re: Possible bug with a 206Partial Response)

2003-02-10 Thread Geoffrey Young
The logic here is simpler: 1. store the new status code (just in case the script has changed it) 2. reset the status code to the one before the script execution 3. if the script has attempted to change the status by itself and the execution status is Apache::OK return that new status.

[ANNOUNCE] mod_perl Developer's Cookbook available in Polish

2003-02-10 Thread Geoffrey Young
for our native Polish speakers (as well as the archives), the Polish translation of the mod_perl Developer's Cookbook appears to be available and shipping. http://helion.pl/ksiazki/modpkp.htm I haven't seen it yet (nor do I read Polish) but the above site seems to include a tarball of the

Re: Stacked Handlers Execution Chain

2003-01-29 Thread Geoffrey Young
however, DONE is special - it indicates that all content has been sent and the request cycle should proceed straight to the logging phase. from a handler perspective, DONE behaves the same as an error code - it terminates the request cycle. But the book doesn't say that DONE does break

Re: Stacked Handlers Execution Chain

2003-01-28 Thread Geoffrey Young
Helmut Zeilinger wrote: Hi, i am using mod_perl 1.99_08. I have two mod_perl handlers: ... PerlResponseHandler Test::handler0 Test::handler1 ... How can i brake the execution chain between handler0 and handler1? Whatever i try as handler0 return value (OK, DECLINED, FORBIDDEN, 404) the

Re: Stacked Handlers Execution Chain

2003-01-28 Thread Geoffrey Young
First of all let's clear up the 1.0 side: Quoting the eagle book: The exception to this rule [all handlers will run] is if one of the handlers in the series returns an error code (anything other than OK, DECLINED, or DONE) Though the code does *not* check for DONE: mod_perl.c:1375

Re: Object Handlers internal_redirect

2003-01-23 Thread Geoffrey Young
So I converted Util::Tour::Translate's handler into a regular non object handler and everythings works fine. I would rather use object handlers but this doesn't seem possible if a content handler is performing an internal_redirect which might invoke that handler. this has been reported before

Re: rfc: new filtering APIs

2003-01-17 Thread Geoffrey Young
Stas Bekman wrote: Geoffrey Young wrote: Finally, other than add/remove filters APIs which we have talked about, what other APIs do you want for filters? is there an interface to filter_init? see the discussion on http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9673 or CHANGES

Re: [mp2] Conflicting instructions in docs?

2003-01-17 Thread Geoffrey Young
I'm confused. Where's the quick answer to whether or not I should use threads? I'm on FreeBSD 4.7. you shouldn't need -DUSETHREADS unless you plan on using the threaded MPM you can use your normal perl with --with-mpm=prefork (at least I think so :) --Geoff

  1   2   3   4   5   6   7   8   9   >