SOAP-Lite

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


1.11 February 21, 2014
    ! #93080 bug when SOAP::Lite is trying to parse WSDL definition by https with custom settings

1.10 January 23, 2014 
    ! Fixed uninitialized warning when Context-Length is not set [github/dbeusee]
    ! avoid string eval in as_base64 [github/otrosien]
    ! #88915 warnings issued with using importing with +trace

1.09 January 14, 2013
    ! #92025 tighten multipart content-type matching [dmn@debian.org]

1.08 November 8, 2013
    ! #15703 add no_index for examples to prevent CPAN pollution [githumb.com/sergeyromanov]

1.07 November 7, 2013
    ! #89948 Remove warning when Content-Id is not present

1.06 August 21, 2013
    ! #87935 skip all MIME-Parser tests if it is not installed
    ! #87787 Use of uninitialized value $ns in Lite.pm 

lib/SOAP/Constants.pm  view on Meta::CPAN

=head2 $DO_NOT_USE_XML_PARSER

The SOAP::Lite package attempts to locate and use the L<XML::Parser> package, falling back on an internal, pure-Perl parser in its absence. This package is a fast parser, based on the Expat parser developed by James Clark. If the application sets thi...

=head2 $DO_NOT_USE_CHARSET

Unless this parameter is set to 1, outgoing Content-Type headers will include specification of the character set used in encoding the message itself. Not all endpoints (client or server) may be able to properly deal with that data on the content head...

=head2 $DO_NOT_CHECK_CONTENT_TYPE

The content-type itself for a SOAP message is rather clearly defined, and in most cases, an application would have no reason to disable the testing of that header. This having been said, the content-type for SOAP 1.2 is still only a recommended draft...

=head2 $PATCH_HTTP_KEEPALIVE

SOAP::Lite's HTTP Transport module attempts to provide a simple patch to
LWP::Protocol to enable HTTP Keep Alive. By default, this patch is turned
off, if however you would like to turn on the experimental patch change the
constant like so:

  $SOAP::Constants::PATCH_HTTP_KEEPALIVE = 1;

lib/SOAP/Lite/Packager.pm  view on Meta::CPAN

        $name eq 'payload' ?
        $env = $part->bodyhandle()->as_string()
            : $self->push_part($part);
    }
    return $env;
}

sub process_related {
    my $self = shift;
    my ($entity) = @_;
    die "Multipart MIME messages MUST declare Multipart/Related content-type"
        if ($entity->head->mime_attr('content-type') !~ /^multipart\/related/i);
    # As it turns out, the Content-ID and start parameters are optional
    # according to the MIME and SOAP specs. In the event that the head cannot
    # be found, the head/root entity is used as a starting point.
    my $start = get_multipart_id($entity->head->mime_attr('content-type.start'));
    if (!defined($start) || $start eq "") {
        $start = $self->generate_random_string(10);
        $entity->parts(0)->head->add('content-id',$start);
    }
    my $location = $entity->head->mime_attr('content-location')
        || 'thismessage:/';
    my $env;
    foreach my $part ($entity->parts) {
        next if !UNIVERSAL::isa($part => "MIME::Entity");

lib/SOAP/Packager.pm  view on Meta::CPAN

    $name eq 'payload' ?
      $env = $part->bodyhandle->as_string
      : $self->push_part($part);
  }
  return $env;
}

sub process_related {
  my $self = shift;
  my ($entity) = @_;
  die "Multipart MIME messages MUST declare Multipart/Related content-type"
    if ($entity->head->mime_attr('content-type') !~ /^multipart\/related/i);
  # As it turns out, the Content-ID and start parameters are optional
  # according to the MIME and SOAP specs. In the event that the head cannot
  # be found, the head/root entity is used as a starting point.
    # [19 Mar 2008] Modified by Feng Li <feng.li@sybase.com>
    # Check optional start parameter, then optional Content-ID, then create/add
    # Content-ID (the same approach as in SOAP::Lite 0.66)

    #my $start = get_multipart_id($entity->head->mime_attr('content-type.start'));
    my $start = get_multipart_id($entity->head->mime_attr('content-type.start'))
        || get_multipart_id($entity->parts(0)->head->mime_attr('content-id'));

  if (!defined($start) || $start eq "") {
      $start = $self->generate_random_string(10);
      $entity->parts(0)->head->add('content-id',$start);
  }
  my $location = $entity->head->mime_attr('content-location') ||
    'thismessage:/';
  my $env;
  foreach my $part ($entity->parts) {

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

      SOAP::Utils::bytelength $response;

    if ($] > 5.007 && $encoding) {
        require Encode;
        $response = Encode::encode( $encoding, $response );
    }

    $response = Compress::Zlib::compress($response) if $compressed;

# this next line does not look like a good test to see if something is multipart
# perhaps a /content-type:.*multipart\//gi is a better regex?
    my ($is_multipart) =
      ( $response =~ /^content-type:.* boundary="([^\"]*)"/im );

    $self->response(
        HTTP::Response->new(
            $code => undef,
            HTTP::Headers->new(
                'SOAPServer' => $self->product_tokens,
                $compressed ? ( 'Content-Encoding' => $COMPRESS ) : (),
                'Content-Type' => join( '; ',
                    'text/xml',
                    !$SOAP::Constants::DO_NOT_USE_CHARSET

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.317 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )