Re: cvs commit: modperl/src/modules/perl mod_perl.c

2001-04-17 Thread Doug MacEachern

On Wed, 7 Mar 2001, Ask Bjoern Hansen wrote:

> On 6 Oct 2000 [EMAIL PROTECTED] wrote:
> 
> > dougm   00/10/06 13:18:29
> > 
> >   Modified:t/internal error.t
> >src/modules/perl mod_perl.c
> >   Log:
> >   more for the "Apache::send_http_header was resetting r->status = 200" fix
> 
> Doug, do you remember what this was about?

just that sent_http_header should not modify r->status
 
> (I just had a problem with only being able to get redirects from a
> subrequest to work if I set status == 302 but returned 200 from the
> handler).

you should not modify $r->status and return 302 from the handler.




Re: cvs commit: modperl/src/modules/perl mod_perl.c

2001-03-07 Thread Ask Bjoern Hansen

On 6 Oct 2000 [EMAIL PROTECTED] wrote:

> dougm   00/10/06 13:18:29
> 
>   Modified:t/internal error.t
>src/modules/perl mod_perl.c
>   Log:
>   more for the "Apache::send_http_header was resetting r->status = 200" fix

Doug, do you remember what this was about?

(I just had a problem with only being able to get redirects from a
subrequest to work if I set status == 302 but returned 200 from the
handler).

 - ask

>   RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v

>   +if (r->prev && (r->prev->status != HTTP_OK) &&
>   +mod_perl_sent_header(r, 0))
>   +{
>   +/* avoid recursive error for ErrorDocuments */
>   +status = OK;
>   +}
>   +

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();
more than 70M impressions per day, http://valueclick.com




RE: cvs commit: modperl/src/modules/perl mod_perl.c

2000-09-01 Thread Geoffrey Young

the mod_perl.c update is causing conficts with the set_handlers patch...  

the patch works, albit with lots of fuzz, but make yields:

mod_perl.c: In function `perl_run_stacked_handlers':
mod_perl.c:1342: parse error before `register'
make[3]: *** [mod_perl.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr/src/apache_1.3.12/src'
make: *** [apache_httpd] Error 2

just in case you want to issue a new patch :)

--Geoff

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 01, 2000 1:16 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: modperl/src/modules/perl mod_perl.c
> 
> 
> dougm   00/08/31 22:15:42
> 
>   Modified:.Changes
>Leak Leak.xs
>src/modules/perl mod_perl.c
>   Log:
>   fixes for ActivePerl
>   
>   Revision  ChangesPath
>   1.513 +2 -0  modperl/Changes
>   
>   Index: Changes
>   ===
>   RCS file: /home/cvs/modperl/Changes,v
>   retrieving revision 1.512
>   retrieving revision 1.513
>   diff -u -r1.512 -r1.513
>   --- Changes 2000/09/01 05:10:09 1.512
>   +++ Changes 2000/09/01 05:15:37 1.513
>   @@ -10,6 +10,8 @@
>
>=item 1.24_01-dev
>
>   +fixes for ActivePerl [Gurusamy Sarathy <[EMAIL PROTECTED]>]
>   +
>change apaci/Makefile.tmpl and src/modules/perl/Makefile so Perl's
>include path comes before /usr/local/include, e.g. to make 
> sure Perl's 
>patchlevel.h is used, thanks to Ryan Morgan for the spot
>   
>   
>   
>   1.4   +1 -1  modperl/Leak/Leak.xs
>   
>   Index: Leak.xs
>   ===
>   RCS file: /home/cvs/modperl/Leak/Leak.xs,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- Leak.xs 1999/11/15 20:05:27 1.3
>   +++ Leak.xs 2000/09/01 05:15:40 1.4
>   @@ -121,7 +121,7 @@
>{
>char *state = lookup((struct hash_s **)p, sv, t_new); 
>if (state != t_old) { 
>   -   fprintf(stderr, "%s %p : ", state ? state : t_new, sv); 
>   +   PerlIO_printf(PerlIO_stderr(), "%s %p : ", state ? 
> state : t_new, sv); 
>   sv_dump(sv);
>}
>return hwm+1;
>   
>   
>   
>   1.125 +21 -2 modperl/src/modules/perl/mod_perl.c
>   
>   Index: mod_perl.c
>   ===
>   RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
>   retrieving revision 1.124
>   retrieving revision 1.125
>   diff -u -r1.124 -r1.125
>   --- mod_perl.c  2000/08/15 19:36:33 1.124
>   +++ mod_perl.c  2000/09/01 05:15:41 1.125
>   @@ -850,10 +850,21 @@
>dPPDIR;
>dPPREQ;
>dTHR;
>   -GV *gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
>   +GV *gv;
>   +
>   +#ifdef USE_ITHREADS
>   +dTHX;
>   +
>   +if (!aTHX) {
>   +   PERL_SET_CONTEXT(perl);
>   +}
>   +#endif
>
>(void)acquire_mutex(mod_perl_mutex);
>   -
>   +
>   +gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
>   +
>   +   
>#if 0
>/* force 'PerlSendHeader On' for sub-requests
> * e.g. Apache::Sandwich 
>   @@ -1299,6 +1310,14 @@
>I32 i, do_clear=FALSE;
>SV *sub, **svp; 
>int hook_len = strlen(hook);
>   +
>   +#ifdef USE_ITHREADS
>   +dTHX;
>   +
>   +if (!aTHX) {
>   +   PERL_SET_CONTEXT(perl);
>   +}
>   +#endif
>
>if(handlers == Nullav) {
>   if(hv_exists(stacked_handlers, hook, hook_len)) {
>   
>   
>   
> 



Re: cvs commit: modperl/src/modules/perl mod_perl.c

2000-06-05 Thread Doug MacEachern

> I need some help explaining this change. 

i would just call it:
fix for 'sub handler : method {}' support when method is not found






Re: cvs commit: modperl/src/modules/perl mod_perl.c

2000-06-03 Thread Eric Cholet

On Sat, Jun 03, 2000 at 01:57:26PM -0700, Ask Bjoern Hansen wrote:
> On 2 Jun 2000 [EMAIL PROTECTED] wrote:
> 
> >   Modified:src/modules/perl mod_perl.c
> >   Log:
> >   fix segfault
> 
> Don't forget to update Changes.
> 

I need some help explaining this change. 
Here's what happened:

% cat >t/docs/Foo.pm
package foo;
sub handler { warn 'foo' } 
1;

notice the typo, the package declaration says 'foo' instead of 'Foo'

% cat >>t/conf/httpd.conf

PerlHandler Foo
SetHandler perl-script


GET /foo will trigger the segfault. Well, under 5.00502 it does, but under 5.6
I get an (expected) 500 internal server error. 

-- 
Eric Cholet



Re: cvs commit: modperl/src/modules/perl mod_perl.c

2000-06-03 Thread Ask Bjoern Hansen

On 2 Jun 2000 [EMAIL PROTECTED] wrote:

>   Modified:src/modules/perl mod_perl.c
>   Log:
>   fix segfault

Don't forget to update Changes.


 - ask