How do I stop my e-mail subscription?
Stacked handlers bug unit test
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Apache HTTP Server > Stacked handlers bug unit test 16 November 2007 01:04:23

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Stacked handlers bug unit test

Fred Moyer 16 November 2007 01:04:23
 Hi Phillipe :)­

Here is the unit test I was telling you about for the bug I found where
pushing handlers onto a different phase of the request cycle causes the
push to act as a set_handler instead. I dug into the guts of
modperl_handler.c looking for what is causing this but I'm still green
in dealing with the mod_perl internals.

I'll track you down later and demonstrate this issue.

- Fred

Index: t/hooks/TestHooks/s­tacked_handlers2.pm
===================­====================­====================­========
--- t/hooks/TestHooks/s­tacked_handlers2.pm (revision 584452)
+++ t/hooks/TestHooks/s­tacked_handlers2.pm (working copy)
@@ -45,6 +45,17 @@
return Apache2::Const::SER­VER_ERROR;
}

+sub push_fixup_handler {
+
+ my $r = shift;
+
+ $r->push_handlers(P­erlFixupHandler => \&ok);
+
+ callback($r);
+
+ return Apache2::Const::OK;­
+}
+
sub push_handlers {

my $r = shift;
@@ -150,7 +161,8 @@

PerlModule TestHooks::stacked_­handlers2

- # all 2 run
+ # all 3 run
+ PerlPostReadRequest­Handler
TestHooks::stacked_­handlers2::push_fixu­p_handler
PerlPostReadRequest­Handler TestHooks::stacked_­handlers2::ok
TestHooks::stacked_­handlers2::ok

# 1 run, 1 left behind

Index: t/hooks/stacked_han­dlers2.t
===================­====================­====================­========
--- t/hooks/stacked_han­dlers2.t (revision 584452)
+++ t/hooks/stacked_han­dlers2.t (working copy)
@@ -18,7 +18,7 @@

plan tests => 1;

-my $expected = q!ran 2 PerlPostReadRequest­Handler handlers
+my $expected = q!ran 3 PerlPostReadRequest­Handler handlers
ran 1 PerlTransHandler handlers
ran 1 PerlMapToStorageHan­dler handlers
ran 4 PerlHeaderParserHan­dler handlers
@@ -26,7 +26,7 @@
ran 2 PerlAuthenHandler handlers
ran 2 PerlAuthzHandler handlers
ran 1 PerlTypeHandler handlers
-ran 4 PerlFixupHandler handlers
+ran 3 PerlFixupHandler handlers
ran 2 PerlResponseHandler­ handlers
ran 2 PerlOutputFilterHan­dler handlers!;
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Apache HTTP Server > Stacked handlers bug unit test 16 November 2007 01:04:23

see also:
Getting info from the web
:before workaround for IE?
The value of CIW Certification
пройди тесты:
see also:
Rise of the Machines
avast! Virus Cleaner
world's first 10 megapixel multimedia…

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .