Date: Fri, 22 Aug 2014 13:40:48 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r365656 - in head/www/p5-Catalyst-Plugin-Server: . files Message-ID: <201408221340.s7MDemKf051097@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Fri Aug 22 13:40:47 2014 New Revision: 365656 URL: http://svnweb.freebsd.org/changeset/ports/365656 QAT: https://qat.redports.org/buildarchive/r365656/ Log: 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. Modified: head/www/p5-Catalyst-Plugin-Server/Makefile head/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm Modified: head/www/p5-Catalyst-Plugin-Server/Makefile ============================================================================== --- head/www/p5-Catalyst-Plugin-Server/Makefile Fri Aug 22 13:38:14 2014 (r365655) +++ head/www/p5-Catalyst-Plugin-Server/Makefile Fri Aug 22 13:40:47 2014 (r365656) @@ -14,8 +14,8 @@ COMMENT= Catalyst Server Plugin: Base & 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 \ Modified: head/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm ============================================================================== --- head/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm Fri Aug 22 13:38:14 2014 (r365655) +++ head/www/p5-Catalyst-Plugin-Server/files/patch-lib-Catalyst-Plugin-Server-XMLRPC.pm Fri Aug 22 13:40:47 2014 (r365656) @@ -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>.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408221340.s7MDemKf051097>