?
(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/
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/
—and apparently written a patch.)
Cheers,
--
Dorian Taylor
http://doriantaylor.com/
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
dorian.taylor.li...@gmail.com wrote:
Hello,
Is there a reason why
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
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
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 installing
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
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 getting
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 anything
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
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
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 scope of
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)
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
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,
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
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
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
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
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'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.
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
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
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
wanted
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
anything
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
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
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 looping over
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 subrequest,
just not more than once. the construct
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 backport
mod_dav_lock.
oh well
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 does not
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
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
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
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
40 matches
Mail list logo