forked from pool/perl-RPC-XML
- update to version 0.77
* Make RPC::XML::Server work with Net::Server again, after the API changes of Net::Server 2.x. * Correct handling of dateTime parameters * Add port to Host header in client requests. * Fix spelling error in man page * improve tests - remove unused patches which are unused since a long time * RPC-XML-0.53-ext-daemon-and-header-cb.dif * RPC-XML-0.60-fix-utf8.dif OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-RPC-XML?expand=0&rev=23
This commit is contained in:
@@ -1,77 +0,0 @@
|
|||||||
Index: lib/RPC/XML/Server.pm
|
|
||||||
===================================================================
|
|
||||||
--- lib/RPC/XML/Server.pm.orig
|
|
||||||
+++ lib/RPC/XML/Server.pm
|
|
||||||
@@ -136,6 +136,11 @@ sub new
|
|
||||||
$self->{__host} = $args{host} || '';
|
|
||||||
$self->{__port} = $args{port} || '';
|
|
||||||
delete @args{qw(host port)};
|
|
||||||
+ } elsif( ref($args{http_daemon}) ) {
|
|
||||||
+ $self->{__daemon} = $args{http_daemon};
|
|
||||||
+ $self->{__http_header_parsing_cb} = $args{http_header_parsing_cb};
|
|
||||||
+ delete $args{http_daemon};
|
|
||||||
+ delete $args{http_header_parsing_cb};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -154,9 +159,10 @@ sub new
|
|
||||||
$self->{__host} = $URI->host;
|
|
||||||
$self->{__port} = $URI->port;
|
|
||||||
$self->{__daemon} = $http;
|
|
||||||
+ $self->{__http_header_parsing_cb} = $args{http_header_parsing_cb};
|
|
||||||
|
|
||||||
# Remove those we've processed
|
|
||||||
- delete @args{qw(host port queue)};
|
|
||||||
+ delete @args{qw(host port queue http_header_parsing_cb)};
|
|
||||||
}
|
|
||||||
$resp = HTTP::Response->new();
|
|
||||||
return "${class}::new: Unable to create HTTP::Response object"
|
|
||||||
@@ -533,6 +539,23 @@ If a message is to be spooled to a tempo
|
|
||||||
specific directory in which to open those files. If this is not given, then
|
|
||||||
the C<tmpdir> method from the B<File::Spec> package is used, instead.
|
|
||||||
|
|
||||||
+=item daemon
|
|
||||||
+
|
|
||||||
+you can provide a daemon object here, so RPC::XML::Server will not use
|
|
||||||
+it's own HTTP::Daemon but your provided daemon object.
|
|
||||||
+This parameter is optional.
|
|
||||||
+
|
|
||||||
+=item http_header_parsing_cb
|
|
||||||
+
|
|
||||||
+must be a code reference which will be called before anything else happens
|
|
||||||
+to the HTTP data stream. It can be used to parse the HTTP header for HTTP
|
|
||||||
+authentication checks and stuff like that.
|
|
||||||
+This callback function will get the request object (HTTP::Request)
|
|
||||||
+and the connection object (HTTP::Daemon::Clientconn) as parameters.
|
|
||||||
+If the callback function does not return a true value, no further processing
|
|
||||||
+of the request will be done.
|
|
||||||
+This parameter is optional.
|
|
||||||
+
|
|
||||||
=back
|
|
||||||
|
|
||||||
Any other keys in the options hash not explicitly used by the constructor are
|
|
||||||
@@ -1124,7 +1147,6 @@ Randy J. Ray <rjray@blackperl.com>
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
-__END__
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
@@ -1445,6 +1467,11 @@ sub process_request
|
|
||||||
$peerhost = $conn->peerhost;
|
|
||||||
while ($req = $conn->get_request('headers only'))
|
|
||||||
{
|
|
||||||
+ if( ref($self->{__http_header_parsing_cb}) eq 'CODE' ) {
|
|
||||||
+ # we terminate connection unless header parsing
|
|
||||||
+ # returns a true value
|
|
||||||
+ next unless( $self->{__http_header_parsing_cb}->( $req, $conn ) );
|
|
||||||
+ }
|
|
||||||
if ($req->method eq 'HEAD')
|
|
||||||
{
|
|
||||||
# The HEAD method will be answered with our return headers,
|
|
||||||
@@ -2152,3 +2179,4 @@ sub timeout
|
|
||||||
}
|
|
||||||
return $old_timeout;
|
|
||||||
}
|
|
||||||
+__END__
|
|
@@ -1,23 +0,0 @@
|
|||||||
Index: RPC-XML-0.67/lib/RPC/XML.pm
|
|
||||||
===================================================================
|
|
||||||
--- RPC-XML-0.67.orig/lib/RPC/XML.pm
|
|
||||||
+++ RPC-XML-0.67/lib/RPC/XML.pm
|
|
||||||
@@ -1023,7 +1023,9 @@ sub as_string
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
|
|
||||||
- '<fault><value>' . $self->SUPER::as_string . '</value></fault>';
|
|
||||||
+ my $text = '<fault><value>' . $self->SUPER::as_string . '</value></fault>';
|
|
||||||
+ utf8::downgrade($text) if(utf8::is_utf8($text));
|
|
||||||
+ $text;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Again, only differs from struct in that it has some extra wrapped around it.
|
|
||||||
@@ -1314,6 +1316,7 @@ sub as_string
|
|
||||||
'</value></param></params>';
|
|
||||||
}
|
|
||||||
$text .= '</methodResponse>';
|
|
||||||
+ utf8::downgrade($text) if(utf8::is_utf8($text));
|
|
||||||
|
|
||||||
$text;
|
|
||||||
}
|
|
@@ -1,8 +1,8 @@
|
|||||||
Index: t/40_server.t
|
Index: t/40_server.t
|
||||||
===================================================================
|
===================================================================
|
||||||
--- t/40_server.t.orig 2010-10-22 10:15:38.000000000 +0200
|
--- t/40_server.t.orig
|
||||||
+++ t/40_server.t 2011-03-22 07:35:52.549287223 +0100
|
+++ t/40_server.t
|
||||||
@@ -63,8 +63,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2
|
@@ -164,8 +164,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2
|
||||||
# 22/09/2008 - Just allow for anything the user has attached to this address.
|
# 22/09/2008 - Just allow for anything the user has attached to this address.
|
||||||
# Aliases keep causing this test to falsely fail.
|
# Aliases keep causing this test to falsely fail.
|
||||||
my @localhostinfo = gethostbyname('localhost');
|
my @localhostinfo = gethostbyname('localhost');
|
||||||
@@ -15,8 +15,8 @@ Index: t/40_server.t
|
|||||||
# "localhost" on win32
|
# "localhost" on win32
|
||||||
Index: t/40_server_xmllibxml.t
|
Index: t/40_server_xmllibxml.t
|
||||||
===================================================================
|
===================================================================
|
||||||
--- t/40_server_xmllibxml.t.orig 2010-10-22 10:15:38.000000000 +0200
|
--- t/40_server_xmllibxml.t.orig
|
||||||
+++ t/40_server_xmllibxml.t 2011-03-22 07:36:56.583394893 +0100
|
+++ t/40_server_xmllibxml.t
|
||||||
@@ -80,8 +80,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2
|
@@ -80,8 +80,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2
|
||||||
# 22/09/2008 - Just allow for anything the user has attached to this address.
|
# 22/09/2008 - Just allow for anything the user has attached to this address.
|
||||||
# Aliases keep causing this test to falsely fail.
|
# Aliases keep causing this test to falsely fail.
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:bde9e1de5d550badaf03e2670c7b760212d41601e0d2a157c107d55972adb0cc
|
|
||||||
size 203771
|
|
3
RPC-XML-0.77.tar.gz
Normal file
3
RPC-XML-0.77.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e38c5d131e8c29f41ca39ac1e4b7abd33ed1c9b417e0d8ac1c24a056ce7e6f5a
|
||||||
|
size 205679
|
@@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun May 5 12:05:08 UTC 2013 - mc@suse.com
|
||||||
|
|
||||||
|
- update to version 0.77
|
||||||
|
* Make RPC::XML::Server work with Net::Server again,
|
||||||
|
after the API changes of Net::Server 2.x.
|
||||||
|
* Correct handling of dateTime parameters
|
||||||
|
* Add port to Host header in client requests.
|
||||||
|
* Fix spelling error in man page
|
||||||
|
* improve tests
|
||||||
|
- remove unused patches which are unused since a long time
|
||||||
|
* RPC-XML-0.53-ext-daemon-and-header-cb.dif
|
||||||
|
* RPC-XML-0.60-fix-utf8.dif
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 4 18:12:08 CEST 2012 - mls@suse.de
|
Mon Jun 4 18:12:08 CEST 2012 - mls@suse.de
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-RPC-XML
|
# spec file for package perl-RPC-XML
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: perl-RPC-XML
|
Name: perl-RPC-XML
|
||||||
Version: 0.76
|
Version: 0.77
|
||||||
Release: 0
|
Release: 0
|
||||||
%define cpan_name RPC-XML
|
%define cpan_name RPC-XML
|
||||||
Summary: A set of classes for core data, message and XML handling
|
Summary: A set of classes for core data, message and XML handling
|
||||||
@@ -25,13 +25,9 @@ License: GPL-1.0+ or Artistic-1.0
|
|||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: http://search.cpan.org/dist/RPC-XML/
|
Url: http://search.cpan.org/dist/RPC-XML/
|
||||||
Source: http://www.cpan.org/authors/id/R/RJ/RJRAY/RPC-XML-%{version}.tar.gz
|
Source: http://www.cpan.org/authors/id/R/RJ/RJRAY/RPC-XML-%{version}.tar.gz
|
||||||
# UNCLEAR
|
|
||||||
Source1: RPC-XML-0.53-ext-daemon-and-header-cb.dif
|
|
||||||
# UNCLEAR
|
|
||||||
Source2: RPC-XML-0.60-fix-utf8.dif
|
|
||||||
#PATCH-FIX-OPENSUSE - ro@suse.de - fix build in chroot/buildservice
|
#PATCH-FIX-OPENSUSE - ro@suse.de - fix build in chroot/buildservice
|
||||||
Patch2: RPC-XML-0.60-rev127.dif
|
Patch1: RPC-XML-0.60-rev127.dif
|
||||||
Patch3: RPC-XML-0.76-extern_ent.dif
|
Patch2: RPC-XML-0.76-extern_ent.dif
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(File::Spec) >= 0.8
|
BuildRequires: perl(File::Spec) >= 0.8
|
||||||
@@ -40,12 +36,12 @@ BuildRequires: perl(Scalar::Util) >= 1.19
|
|||||||
BuildRequires: perl(XML::LibXML) >= 1.70
|
BuildRequires: perl(XML::LibXML) >= 1.70
|
||||||
BuildRequires: perl(XML::Parser) >= 2.31
|
BuildRequires: perl(XML::Parser) >= 2.31
|
||||||
BuildRequires: perl(constant) >= 1.03
|
BuildRequires: perl(constant) >= 1.03
|
||||||
Requires: perl(constant) >= 1.03
|
|
||||||
Requires: perl(File::Spec) >= 0.8
|
Requires: perl(File::Spec) >= 0.8
|
||||||
Requires: perl(LWP) >= 5.834
|
Requires: perl(LWP) >= 5.834
|
||||||
Requires: perl(Scalar::Util) >= 1.19
|
Requires: perl(Scalar::Util) >= 1.19
|
||||||
Requires: perl(XML::LibXML) >= 1.70
|
Requires: perl(XML::LibXML) >= 1.70
|
||||||
Requires: perl(XML::Parser) >= 2.31
|
Requires: perl(XML::Parser) >= 2.31
|
||||||
|
Requires: perl(constant) >= 1.03
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
@@ -66,8 +62,8 @@ RPC::XML::Server manpage, respectively.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
%patch2 -p0
|
%patch1 -p0
|
||||||
%patch3
|
%patch2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
|
Reference in New Issue
Block a user