Apache2-SOAP

 view release on metacpan or  search on metacpan

lib/SOAP/Transport/HTTP2.pm  view on Meta::CPAN

sub handler { 
  my $self = shift->new; 
  my $r = shift;
  unless ($r) {
    $r = ($self->{'MOD_PERL_VERSION'} == 1) ?
      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.



( run in 0.694 second using v1.01-cache-2.11-cpan-de7293f3b23 )