Apache2-SOAP
view release on metacpan or search on metacpan
lib/Apache2/SOAP.pm view on Meta::CPAN
use SOAP::Transport::HTTP2;
@ISA = qw(SOAP::Transport::HTTP2::Apache);
#$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: $ =~ /-(\d+)_([\d_]+)/);
$VERSION = 0.73;
my $server = __PACKAGE__->new;
sub handler {
$server->configure(@_);
$server->SUPER::handler(@_);
}
# ======================================================================
1;
__END__
=head1 NAME
lib/SOAP/Transport/HTTP2.pm view on Meta::CPAN
use vars qw(@ISA);
@ISA = qw(SOAP::Transport::HTTP::Server);
sub DESTROY { SOAP::Trace::objects('()') }
sub new {
my $self = shift;
unless (ref $self) {
my $class = ref($self) || $self;
$self = $class->SUPER::new(@_);
SOAP::Trace::objects('()');
}
MOD_PERL: {
( (exists $ENV{MOD_PERL_API_VERSION}) &&
($ENV{MOD_PERL_API_VERSION} == 2) ) and do {
require Apache2::RequestRec;
require Apache2::RequestUtil;
require Apache2::RequestIO;
require Apache2::Const;
require APR::Table;
lib/SOAP/Transport/HTTP2.pm view on Meta::CPAN
Apache->request : Apache2::RequestUtil->request();
}
my $cl = ($self->{'MOD_PERL_VERSION'} == 1) ?
$r->header_in('Content-length') : $r->headers_in->{'Content-length'};
$self->request(HTTP::Request->new(
$r->method() => $r->uri,
HTTP::Headers->new($r->headers_in),
do { my ($c,$buf); while ($r->read($buf,$cl)) { $c.=$buf; } $c; }
));
$self->SUPER::handle;
# we will specify status manually for Apache, because
# if we do it as it has to be done, returning SERVER_ERROR,
# Apache will modify our content_type to 'text/html; ....'
# which is not what we want.
# will emulate normal response, but with custom status code
# which could also be 500.
if ($self->{'MOD_PERL_VERSION'} == 1 ) {
$self->response->headers->scan(sub { $r->header_out(@_) });
$r->send_http_header(join '; ', $self->response->content_type);
( run in 1.072 second using v1.01-cache-2.11-cpan-49f99fa48dc )