diff options
author | des <des@FreeBSD.org> | 2014-08-22 21:40:47 +0800 |
---|---|---|
committer | des <des@FreeBSD.org> | 2014-08-22 21:40:47 +0800 |
commit | 20a74ca5209407090198f227be0b43459ac17af0 (patch) | |
tree | d954c67e5d0f0ccd6b0b07f17eca06a5ca887936 /www | |
parent | 55e3f10e805d44bf18fb88770800cc10fa7426d3 (diff) | |
download | freebsd-ports-gnome-20a74ca5209407090198f227be0b43459ac17af0.tar.gz freebsd-ports-gnome-20a74ca5209407090198f227be0b43459ac17af0.tar.zst freebsd-ports-gnome-20a74ca5209407090198f227be0b43459ac17af0.zip |
The previous commit was broken - don't know how I managed to install the
result. Fix the version requirement for Catalyst::DispatchType::Regex.
While there, add a patch that ensures that errors are reported correctly,
i.e. 500 for an internal error and 400 for an invalid request.
Diffstat (limited to 'www')
-rw-r--r-- | www/p5-Catalyst-Plugin-Server/Makefile | 4 | ||||
-rw-r--r-- | www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm | 44 |
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>. |