I've started port my web application from Apache 1 to the Apache 2. Since I've patched module SOAP::Lite::Transport::HTTP and I hope that it will be useful for someone :)
In ideal case, will be better use condition inside this module for both version mod_perl or customize this module when it is installed.
--- /usr/lib/perl5/site_perl/5.8.0/SOAP/Transport/HTTP.pm 2002-0 +4-16 07:43:02.000000000 +0300 +++ HTTP.pm 2003-10-24 14:00:22.000000000 +0300 @@ -409,7 +409,7 @@ sub DESTROY { SOAP::Trace::objects('()') } -sub new { require Apache; require Apache::Constants; +sub new { require Apache2; require Apache::Const; my $self = shift; unless (ref $self) { @@ -421,13 +421,14 @@ } sub handler { + use Apache::Const qw(OK); my $self = shift->new; my $r = shift || Apache->request; $self->request(HTTP::Request->new( $r->method => $r->uri, HTTP::Headers->new($r->headers_in), - do { my $buf; $r->read($buf, $r->header_in('Content-length')); $b +uf; } + do { my $buf; $r->read($buf, $r->headers_in->get('Content-length' +)); $buf; } )); $self->SUPER::handle; @@ -438,10 +439,10 @@ # will emulate normal response, but with custom status code # which could also be 500. $r->status($self->response->code); - $self->response->headers->scan(sub { $r->header_out(@_) }); + $self->response->headers->scan(sub { $r->headers_out->set(@_) }); $r->send_http_header(join '; ', $self->response->content_type); $r->print($self->response->content); - &Apache::Constants::OK; + OK; } sub configure {
In reply to SOAP::Lite patch for mod_perl2 by nite_man
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |