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
the most bizarre thing popped up when i was trying to build a
mod_perl deb (and from regular source) on debian testing/i386:
String found where operator expected at /usr/lib/perl/5.8/IO.pm line 11, near
"XSLoader::load 'IO'"
(Do you need to predeclare XSLoader::load?)
syntax error at /usr
> 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 adds
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
did this go away? i can't find any mention of it in the source other
than the documentation and core module logic. i'm currently playing
with making a container configuration, and the documentation says
to set OR_EXEC_ON_READ on the req_override, but it doesn't appear
to be present in Apache2::Cons
> 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 options:
hm, this is unfortunate
> it'd be nice to run a benchmark. I wonder why ap_save_brigade was marked
> as ! in the map file. Which normally means it's not going to be exposed.
> Did you by chance look at the archives for possible references to it?
there's a mention of it in the APR::Bucket manpage. i couldn't find
anythi
> 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
Using Debian testing with the packaged versions of Apache 2.0.54-prefork
and APR 0.9.6, I ran make source_scan on the -current (rc6) tarball.
It seems that only the constant groups fopen, fprot and filetype
were found. I can only presume after looking at Apache2::ParseSource,
that the required apr
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 7 01:17
Using Debian testing with the packaged versions of Apache 2.0.54-prefork
and APR 0.9.6, I ran make source_scan on the -current (rc6) tarball.
It seems that only the constant groups fopen, fprot and filetype
were found. I can only presume after looking at Apache2::ParseSource,
that the required apr
same issue, now with a function that exists. ;)
i've been reading apache list archives and source changelogs regarding
a bug recently fixed in ap_bucket_save. i noticed that it was marked
with a ! in xs/maps/apache_functions.map. was it unimplemented due
to this bug or are there other implications to enabling this
functionality?
cheers
.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
here's my solution to handler loop prevention when the initial
request to a handler isn't necessarily the main request:
sub handler {
my $r = shift;
my $mr = $r->main || $r;
if ($mr->notes->get(__PACKAGE__ . '::SEEN')) {
$r->log->debug("We are looping.");
return Apache
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
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 subrequest,
just not more than once. the construct i tried is:
for (my $pr = $r; $pr; $pr = $pr->prev) {
if ($pr->notes->get(__PACKAGE__
i guess i had never come across it before, but i noticed today, in
an attempt to use $r->location as a prefix for scrubbing path
segments off the front of a request URI, that it's the innermost
block that matches the URI path and that has a Perl*Handler
in it that is returned, not the one in which
i'm running into a problem with the execution of subrequests. the
process dies in modperl_wbucket_flush. this problem occurs with the
same perl code in prefork.c and worker.c on osx.
note, the subrequest is run from a non-response handler (i've tried
header-parser through fixup, same effect). the
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
it's kind of a grey area as to where this problem is living - hence
the double post. taking a mod_perl module that uses SVN::Core (e.g.
SVN::Web), and either preloading it via PerlLoadModule/PerlModule,
or the + notation in PerlResponseHandler will cause apache to
segfault somewhere around modperl_
suppose i wanted to run a subrequest, but instead of outputting the
body (or headers, or anything) of that request down the wire, i
wanted to snag it for processing in another handler. i tried writing
a filter that gathered the content and stuck it in $f->r->prev->notes,
but it still flushes the he
suppose i wanted to significantly alter the structure of a POST
request via Apache::Request, but i wanted to re-inject the request
body back into the input bucket brigade to be processed by a later
module? i'm thinking something like this:
POST from client
Apache::Request-based handler consumes
if PerlLoadModule supplants the command table, i surmise it does
the job of PerlModule as well (which i understand to be roughly the
equivalent of 'use'). i'm wondering, would there ever be a reason
to load a module without wanting to supplant the command table with
any existing values that may be
> I know you can do:
> $r->location_merge('container_string');
> which forces an earlier merge, but I'm not sure it'll affect the conf
> tree shown by Apache::Directive. Have you tried looking at the C code to
> see whether there is a C API for that?
well, there's $r->per_dir_config and $r->requ
51 matches
Mail list logo