aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2014-08-22 13:40:47 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2014-08-22 13:40:47 +0000
commite8b27d984ff450c82477b264d44c25b74e5f9243 (patch)
treed954c67e5d0f0ccd6b0b07f17eca06a5ca887936
parent0acf3589deb81be4ed9896489e3fb64d6c38f8d1 (diff)
downloadports-e8b27d984ff450c82477b264d44c25b74e5f9243.tar.gz
ports-e8b27d984ff450c82477b264d44c25b74e5f9243.zip
Notes
-rw-r--r--www/p5-Catalyst-Plugin-Server/Makefile4
-rw-r--r--www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm44
2 files changed, 40 insertions, 8 deletions
diff --git a/www/p5-Catalyst-Plugin-Server/Makefile b/www/p5-Catalyst-Plugin-Server/Makefile
index 5fd5c573aff5..ea7c9f748e0c 100644
--- a/www/p5-Catalyst-Plugin-Server/Makefile
+++ b/www/p5-Catalyst-Plugin-Server/Makefile
@@ -14,8 +14,8 @@ COMMENT= Catalyst Server Plugin: Base & XMLRPC
LICENSE= ART10 GPLv1
LICENSE_COMB= dual
-BUILD_DEPENDS= p5-Catalyst-Runtime>=5.7000:${PORTSDIR}/www/p5-Catalyst-Runtime \
- p5-Catalyst-DispatchType-Regex>=5.7000:${PORTSDIR}/www/p5-Catalyst-DispatchType-Regex \
+BUILD_DEPENDS= p5-Catalyst-Runtime>=5.90:${PORTSDIR}/www/p5-Catalyst-Runtime \
+ p5-Catalyst-DispatchType-Regex>=5.90:${PORTSDIR}/www/p5-Catalyst-DispatchType-Regex \
p5-Class-Data-Inheritable>=0:${PORTSDIR}/devel/p5-Class-Data-Inheritable \
p5-MRO-Compat>=0:${PORTSDIR}/devel/p5-MRO-Compat \
p5-Clone-Fast>=0:${PORTSDIR}/devel/p5-Clone-Fast \
diff --git a/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm b/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm
index 7b356d36e031..e4423bc86716 100644
--- a/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm
+++ b/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm
@@ -1,6 +1,15 @@
---- lib/Catalyst/Plugin/Server/XMLRPC.pm.orig
-+++ lib/Catalyst/Plugin/Server/XMLRPC.pm
-@@ -512,7 +512,7 @@ Alias of $c->req->parameters
+--- lib/Catalyst/Plugin/Server/XMLRPC.pm.orig 2010-07-08 20:39:58.000000000 +0200
++++ lib/Catalyst/Plugin/Server/XMLRPC.pm 2014-08-22 15:37:10.637508261 +0200
+@@ -349,7 +349,7 @@
+ }
+ ) {
+ $c->req->xmlrpc->_error(
+- $c, qq[Invalid XMLRPC request: No such method]
++ $c, 400, qq[Invalid XMLRPC request: No such method]
+ );
+ last PREPARE;
+ }
+@@ -512,7 +512,7 @@
__PACKAGE__->mk_accessors(
qw/ path prefix separator attribute convert_params
@@ -9,7 +18,7 @@
/
);
-@@ -532,6 +532,8 @@ Alias of $c->req->parameters
+@@ -532,6 +532,8 @@
|| $DefaultShowErrors );
$self->xml_encoding( $c->config->{xmlrpc}->{xml_encoding} )
if $c->config->{xmlrpc}->{xml_encoding};
@@ -18,7 +27,16 @@
$self->attribute($DefaultAttr);
$self->convert_params( 1 );
-@@ -690,6 +692,9 @@ Alias of $c->req->parameters
+@@ -668,7 +670,7 @@
+
+ ### an error in parsing the request
+ } elsif ( $@ ) {
+- $self->_error( $c, qq[Invalid XMLRPC request "$@"] );
++ $self->_error( $c, 400, qq[Invalid XMLRPC request "$@"] );
+ return;
+
+ ### something is wrong, but who knows what...
+@@ -690,6 +692,9 @@
local $RPC::XML::ENCODING = $c->server->xmlrpc->config->xml_encoding
if $c->server->xmlrpc->config->xml_encoding;
@@ -28,7 +46,21 @@
local $Clone::Fast::BREAK_REFS = 1;
my $res = RPC::XML::response->new(clone($status));
-@@ -808,6 +813,13 @@ default encoding to C<UTF-8> for instance.
+@@ -700,10 +705,11 @@
+
+ ### record errors in the error and debug log -- just for convenience
+ sub _error {
+- my($self, $c, $msg) = @_;
++ my($self, $c, $code, $msg) = @_;
+
++ ($code, $msg) = (500, $code) unless defined $msg;
+ $c->log->debug( $msg ) if $c->debug;
+- $c->error( $msg );
++ $self->error( [ $code, $msg ] );
+ }
+ }
+
+@@ -808,6 +814,13 @@
Defaults to C<us-ascii> which is the default of C<RPC::XML>.