Correction: add_output_filter is in Apache2::Filter but is a member of
$r (or $c). So I'd make a small FixupHandler, not another mod_perl
filter.
--
Dorian Taylor
http://doriantaylor.com/
er patch.
Any insights? Am I undertaking unnecessary yak-shaving?
(Note: I was hoping to be able to cargo-cult up a re-ordered sequence
with mod_filter, but that got me nowhere. Actually, it got me a
segfault.)
Thanks,
--
Dorian Taylor
http://doriantaylor.com/
's really no reason why it couldn't be implemented in mod_perl in
a way that stipulates passing a target brigade in as input though. I'm
pretty sure it'd be a heck of a lot more efficient than that
subroutine I just wrote above.
On Mon, Jul 22, 2013 at 12:14 AM, dorian taylor
om%3E
—and apparently written a patch.)
Cheers,
--
Dorian Taylor
http://doriantaylor.com/
$chunk instead of appending to it
(originally I had it as $buf). So I'm interested if there is a more
appropriate way to do this.
For reference, I am using: Apache/2.2.11 (Ubuntu) DAV/2 SVN/1.5.4
mod_perl/2.0.4 Perl/v5.10.0
Thanks,
--
Dorian Taylor
Make things. Make sense.
http://doriantaylor.com
> Assuming you're aware of the renaming issue:
>http://perl.apache.org/docs/2.0/rename.html
> I've seen a similar error when installing a current
> CPAN/svn mod_perl-2 over top of an existing mod_perl-2
> that followed the old API. Did you remove any old
> mod_perl-2 installation before instal
mpilation aborted at Makefile.PL line 36.
now, if i go disambiguate XSLoader::load with parentheses, it
complains of an undefined subroutine.
i'm not sure what's eating XSLoader's symbols, but it's sure messing
me up. has anything around this sphere been changed recently, say,
in the last couple weeks?
.dorian
> this is fixed in svn
hm weird i thought i updated before i checked again.
> why? I think that at best I was mis-using the call to reset() - it always
> accepted $self as an argument, but since it wasn't actually being used I
> ignored it, mostly because I didn't want to mess around with gettin
apparently the reset() method of Test::Builder >= 0.29_01 has been
turned into an instance-only method, thus any call to
Apache::Test::test_pm_refresh() when using Apache::Test qw(-withtestmore)
will cause test code to die. perhaps schwern should be notified as well?
.d
On Thu, Jun 23, 2005 at 03:19:22PM -0400, Perrin Harkins wrote:
> On Thu, 2005-06-23 at 10:46 +0200, Jan Eden wrote:
> > could it be that mod_perl doesn't play nice with the Switch module?
>
> Isn't it a source filter? Those don't work with mod_perl.
>
> You probably shouldn't use Switch for any
uh, hate to bring up a no-brainer, but just out of curiosity, is
the Content-length request header accurate for the encoded payload
*after* it's encoded? just on the off chance that libapreq2 is
stricter than libapreq1, an error like "end of file reached" would
occur if there was extraneous data af
is there a working example of a block directive implementation
available? i just tried setting one up the way
http://perl.apache.org/docs/2.0/user/config/custom.html#C_Apache2__Const__RAW_ARGS_
says, and i'm not appearing to get my config subroutine run.
the config parser doesn't complain about th
> sounds nice :)
thanks ;)
> if you succeed, is there any chance you could make the logic you came up
> with generic enough to release it as a separate package? it would be really
> nice to be able to use something like this from Makefile.PL
see below...
>
> use Apache::ExtUtils::SomeName;
i've just completed a couple logging convenience modules. the first:
http://search.cpan.org/~dorian/Apache-DebugLog-0.01/
allows for two dimensional (i.e. category, verbosity) debug logging
on top of the normal debug log. the second:
http://search.cpan.org/~dorian/Apache-LogF-0.01/
simply
so i'm working on one of my modules that works in both mod_perl 1
and 2, (custom config directives, conditional makefile processing,
the whole nine) and i realized i have to test against both apache
1 and 2, preferably in one sequence. now, there's APACHE_TEST_APXS,
APACHE_TEST_HTTPD and whatnot, b
> Hmm, have you considered removing the _filter sub and writing
> it as a closure instead? Here's some code that I've been using
> for that:
i suppose i could do that. today is clean-my-modules-and-get-them-on-cpan
day so perhaps later. ;)
.d
http://search.cpan.org/~dorian/ - now with working tests.
0.03 should show up soon (forgot to remove the bit about ap_save_brigade
in 0.02)
On Wed, Jun 08, 2005 at 12:00:23PM -0400, John Siracusa wrote:
> On 6/8/05, Geoffrey Young <[EMAIL PROTECTED]> wrote:
> > $r->location() ?
>
> Duh, I'm an idiot. Thanks :)
>
> -John
$r->location will also return whatever's in a LocationMatch, Directory
and DirectoryMatch directive, should the s
> Or rewrite it to stash data from $bb->flatten, instead of stashing
> brigades. In which case, no extra API is needed.
this is true. i'll put something up on cpan tonight.
.dorian
> http://search.cpan.org/dist/Apache-TrapSubRequest/lib/Apache/TrapSubRequest.pm
this is actually broken. it needs the ap_save_brigade patch. i'm
in a c mood so i think i'll hook up an xs version tonight. thanks
for reminding me.
.dorian
sent in Apache2::Const. bizarre.
.dorian
> in apache 1.3 yes, just change the order of the modules with LoadModule
> or ClearModuleList+AddModule. in 2.0 you need to alter the mod_rewrite
> or mod_perl sources, unfortunately.
yeah i just looked at that. what happend to Apache2::Hook?
.dorian
i was under the impression that for each phase in the request,
modules were hooked in the order they were loaded. has this behavior
changed? is there any way to force mod_rewrite, for example, to
operate before mod_perl in the transhandler phase?
cheers
.dorian
i was under the impression that for each phase in the request,
modules were hooked in the order they were loaded. has this behavior
changed? is there any way to force mod_rewrite, for example, to
operate before mod_perl in the transhandler phase?
cheers
.dorian
> I'm not getting very far with this, Dorian. Neither httpd-dev nor apr-dev
> are taking it anywhere. So at the moment ap_save_brigade is sort of an
> unstable API, so other developers think we shouldn't expose it in the core
> API. So at the moment you have two
PROPFIND responses into xslt processors.
.dorian
> How is that related?
i think that's some cargo culting that i didn't clean up. that can
be disregarded.
> So you think this approach will be faster than flattening bb on each
> filter invocation and concatenating the scalar?
honestly i didn't give it any thought. when i wrote this i just
want
x27;m currently running a make test (which seems to pass minus
content_length_header.t, but that's another issue).
.dorian
no tests currently, but there's a module on cpan that uses it.
http://search.cpan.org/~DORIAN/Apache-TrapSubRequest-0.01/
diff -ur mod_perl-2.0.0-RC4/lib/Apache/ParseSource.pm
mod_perl-2.0.0-RC4-djt/lib/Apache/ParseSource.pm
--- mod_perl-2.0.0-RC4/lib/Apache/ParseSource.pmFri Jan
x27;m currently running a make test (which seems to pass minus
content_length_header.t, but that's another issue).
.dorian
same issue, now with a function that exists. ;)
heers
.dorian
how would i go about retrieving (mod_perl or otherwise) the name
of the immediate calling handler of the current handler being
executed?
i'm trying to do loop checking in which a given handler may need
to be executed as a result of multiple subrequests, but never back
to back.
e.g.:
# httpd.conf
("We are looping.");
return Apache::DECLINED;
}
$mr->notes->set(__PACKAGE__ . '::SEEN', 1);
# ... do stuff, including other lookup_uri/lookup_file requests.
$mr->notes->unset(__PACKAGE__ . '::SEEN');
return Apache::OK; # or whatever other status
}
comments?
.dorian
aha.
$r->lookup_uri doesn't set the calling request object into $subr->prev,
according to the apache source. i can't see any way to refer to the
calling request from a subrequest, unless the calling request is
the main request.
how frustrating.
.d
On Thu, Jan 20, 2005 at 02:32:59PM -0800, Philippe M. Chiasson wrote:
> Dorian Taylor wrote:
> >suppose i wanted the same logic as:
> >
> >return Apache::DECLINED unless $r->is_initial_req;
> >
> >except that sometimes it may be necessary to serve for a su
On Thu, Jan 20, 2005 at 05:00:32PM -0500, Geoffrey Young wrote:
>
> > what technique would you use if you had to have a handler work
> > exactly once, even though it may never be invoked as an initial
> > request?
>
> if you're in prefork, off the top of my head I might set a perl global and
> th
> instead of looping around try $r->main->notes or $r->prev->notes
hm, that loop should eventually hit all requests in the chain though, no?
also, the first hit to that handler could in fact be a subrequest,
so $r->main->notes may never be set.
i do admit i'm cargo culting a little bit by loopin
otes->get(__PACKAGE__ . '::SEEN')) {
$r->log->debug("We've been seen already.");
return Apache::DECLINED;
}
}
$r->notes->set(__PACKAGE__ . '::SEEN', 1);
but i get no love. what's the preferred way of dealing with this?
cheers
.dorian
/bar/bitz yields the same results as GET /foo/bar.
how would i reliably get MyApache::NopHandler to only ever emit
"/foo"?
cheers
.dorian
fect). the crash will not occur
if the handler is invoked as a response handler.
if subrequests aren't meant to be run from non-response handlers,
i suggest trapping and throwing an error.
.dorian
On Tue, Nov 23, 2004 at 10:08:49PM +, Dorian Taylor wrote:
> > But I don't see the problem that you describe.
>
> hm, i guess that makes the problem either a mac thing, an apr thing
> or an apache thing.
apparently it's httpd-2.1. damnit. that means now i have to b
> But I don't see the problem that you describe.
hm, i guess that makes the problem either a mac thing, an apr thing
or an apache thing.
> Though I've httpd-2.0 and apr-0. Does this distro crash for you?
i'm rolling back now. i have httpd-2.1 for mod_dav_lock (i tried
just grabbing that separat
argh, spacy today.
*here* is the file.
APR-CrashMe-0.01.tar.gz
Description: application/tar-gz
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
oops, sorry, was in the wrong mutt window.
> >what exactly is required from mod_perl in the preflight config
> >stage? does it basically just `use' every preloaded module in the
> >conf to see if it can?
> I'm not sure what do you ask. I meant apr design problem, not modperl's
> one. mod_perl d
> getting things to work. I first spent hours trying to get the mandrake
> cooker binaries to work, but eventually I've built everything from source.
yeah i went that way installing it all on my mac. i typically find
i end up needing the source for reference if nothing else at one
point or anothe
(pool=0x18bc818) at
memory/unix/apr_pools.c:714
#7 0x003a55c0 in apr_pool_clear (pool=0x1806218) at memory/unix/apr_pools.c:673
#8 0x0002870c in main (argc=3, argv=0xbe88) at main.c:653
cheers
.dorian
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/m
ushes the headers of the main request. what would
be the most appropriate way to go about doing this kind of thing?
cheers
dorian
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maill
akes document to be PUT and PUTs it somewhere
is this kind of thing possible in any way?
.dorian
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
> The two are not the same, as explained here:
> http://perl.apache.org/docs/2.0/user/config/custom.html#Enabling_the_New_Configuration_Directives
>
> "This [PerlLoadModule] directive is similar to PerlModule, but it
> require()'s the Perl module immediately, causing an early mod_perl startup."
ues that may be present? would it make sense at all
to effectively disambiguate the two directives by making them both
synonyms for PerlLoadModule?
cheers
.dorian
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://
rned from
$r->(per_dir|request)_config. although, that seems like more of a
"write" than a "read" method. what i'm after is the result of the
merge without actually permanently modifying anything.
will look at httpd source i guess, and the mod_perl 2 source again
r possible VirtualHost, Location, Directory and
.htaccess have been merged? i tried Apache::Directive, but that
seems to more or less just give me the conf as it was written.
cheers
.dorian
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List
patch, let me know.
cheers
.dorian
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
> yes. from DBI.pm:
ah, sneaky.
this seems to work:
package XMLTest;
use strict;
use warnings;
use XML::LibXML;
our $XML;
*_new = \&XML::LibXML::new;
*XML::LibXML::new = \&new;
sub new {
return $XML ||= _new(@_);
}
1;
__END__
minus a bit of whining about the sub redefinition, of cour
I'm interested in implementing a one-per-child caching module for
other applications (XML::LibXML comes to mind), similar to how
Apache::DBI overloads DBI::connect(). I can't seem to derive an
understanding of how Apache::DBI does what it does from its source.
Is it a property of DBI itself? Would
> > i'm actually really early on in this project, and could switch over to
> > apache/mod_perl 2 without much fuss and use an input filter.
>
> That would probably be best if it truly has to be transparent and you
> need to modify content and not just args.
yes, as long as i can trap the entire r
On Wed, Apr 07, 2004 at 05:08:51PM +0200, Tom Schindl wrote:
> As far as I know not but you could pass information using $r->pnotes(),
> maybe you could also use
>
> my $apr = Apache::Request->instance($r);
>
> In all modules in the chain and use $apr->param() to set/reset different
> things.
is there any way currently to take the content of a request (say,
from a POST or PUT), modify it an arbitrary way, then somehow put
it back into the request object to make it available to handlers
further down the chain?
thanks in advance
.dorian
--
Report problems: http://perl.apache.org/bugs
disregard that, i just looked again and i suppose that would be way
too arbitrary to map out properly.
.d
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
is there currently any way (or plan) to register/use providers in
mod_perl 2? a quick grep through the source would suggest not, but
perhaps i'm missing something less obvious?
cheers
.dorian
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/mai
61 matches
Mail list logo