From owner-svn-ports-all@FreeBSD.ORG Sat Mar 29 08:43:22 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E371D451; Sat, 29 Mar 2014 08:43:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2C7D76C; Sat, 29 Mar 2014 08:43:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T8hMEg072538; Sat, 29 Mar 2014 08:43:22 GMT (envelope-from sunpoet@svn.freebsd.org) Received: (from sunpoet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2T8hLWh072527; Sat, 29 Mar 2014 08:43:21 GMT (envelope-from sunpoet@svn.freebsd.org) Message-Id: <201403290843.s2T8hLWh072527@svn.freebsd.org> From: Sunpoet Po-Chuan Hsieh Date: Sat, 29 Mar 2014 08:43:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r349490 - in head/www: . p5-Plack-Middleware-MethodOverride X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 08:43:23 -0000 Author: sunpoet Date: Sat Mar 29 08:43:21 2014 New Revision: 349490 URL: http://svnweb.freebsd.org/changeset/ports/349490 QAT: https://qat.redports.org/buildarchive/r349490/ Log: - Add p5-Plack-Middleware-MethodOverride 0.10 Writing RESTful apps is a good thing, but if you're also trying to support web browsers, you're probably going to need some hackish workarounds. This module provides one such workaround for your Plack applications. Specifically, you can also use a header named X-HTTP-Method-Override (as used by Google for its APIs) override the POST request method. Or you can add a parameter named x-tunneled-method to your form action's query. Either way, the overriding works only via POST requests, not GET. If either of these attributes are available in a POST request, the REQUEST_METHOD key of the Plack environment hash will be replaced with its value. This allows your apps to override any HTTP method over POST. If your application needs to know that such overriding has taken place, the original method is stored under the plack.original_request_method key in the Plack environment hash. The list of methods you can specify are: GET, POST, HEAD, PUT, DELETE, OPTIONS, TRACE and CONNECT. WWW: http://search.cpan.org/dist/Plack-Middleware-MethodOverride/ Added: head/www/p5-Plack-Middleware-MethodOverride/ head/www/p5-Plack-Middleware-MethodOverride/Makefile (contents, props changed) head/www/p5-Plack-Middleware-MethodOverride/distinfo (contents, props changed) head/www/p5-Plack-Middleware-MethodOverride/pkg-descr (contents, props changed) head/www/p5-Plack-Middleware-MethodOverride/pkg-plist (contents, props changed) Modified: head/www/Makefile Modified: head/www/Makefile ============================================================================== --- head/www/Makefile Sat Mar 29 08:42:33 2014 (r349489) +++ head/www/Makefile Sat Mar 29 08:43:21 2014 (r349490) @@ -1139,6 +1139,7 @@ SUBDIR += p5-Plack-Middleware-InteractiveDebugger SUBDIR += p5-Plack-Middleware-JSConcat SUBDIR += p5-Plack-Middleware-MemoryUsage + SUBDIR += p5-Plack-Middleware-MethodOverride SUBDIR += p5-Plack-Middleware-Precompressed SUBDIR += p5-Plack-Middleware-Reproxy SUBDIR += p5-Plack-Middleware-ReverseProxy Added: head/www/p5-Plack-Middleware-MethodOverride/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Plack-Middleware-MethodOverride/Makefile Sat Mar 29 08:43:21 2014 (r349490) @@ -0,0 +1,25 @@ +# Created by: Sunpoet Po-Chuan Hsieh +# $FreeBSD$ + +PORTNAME= Plack-Middleware-MethodOverride +PORTVERSION= 0.10 +CATEGORIES= www perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Override REST methods to Plack apps via POST + +LICENSE= ART10 GPLv1 +LICENSE_COMB= dual + +BUILD_DEPENDS= p5-Plack>=0.9929:${PORTSDIR}/www/p5-Plack \ + p5-URI>=0:${PORTSDIR}/net/p5-URI +RUN_DEPENDS:= ${BUILD_DEPENDS} +TEST_DEPENDS= p5-Test-Pod>=1.41:${PORTSDIR}/devel/p5-Test-Pod \ + p5-Test-Pod-Coverage>=1.06:${PORTSDIR}/devel/p5-Test-Pod-Coverage + +USE_PERL5= modbuild +USES= perl5 + +.include Added: head/www/p5-Plack-Middleware-MethodOverride/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Plack-Middleware-MethodOverride/distinfo Sat Mar 29 08:43:21 2014 (r349490) @@ -0,0 +1,2 @@ +SHA256 (Plack-Middleware-MethodOverride-0.10.tar.gz) = f8d6a33b56d69dddd5db289f855e100d86ff39099abe31ef40e2672d0dc5568d +SIZE (Plack-Middleware-MethodOverride-0.10.tar.gz) = 4943 Added: head/www/p5-Plack-Middleware-MethodOverride/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Plack-Middleware-MethodOverride/pkg-descr Sat Mar 29 08:43:21 2014 (r349490) @@ -0,0 +1,20 @@ +Writing RESTful apps is a good thing, but if you're also trying to support web +browsers, you're probably going to need some hackish workarounds. This module +provides one such workaround for your Plack applications. + +Specifically, you can also use a header named X-HTTP-Method-Override (as used by +Google for its APIs) override the POST request method. Or you can add a +parameter named x-tunneled-method to your form action's query. Either way, the +overriding works only via POST requests, not GET. + +If either of these attributes are available in a POST request, the +REQUEST_METHOD key of the Plack environment hash will be replaced with its +value. This allows your apps to override any HTTP method over POST. If your +application needs to know that such overriding has taken place, the original +method is stored under the plack.original_request_method key in the Plack +environment hash. + +The list of methods you can specify are: GET, POST, HEAD, PUT, DELETE, OPTIONS, +TRACE and CONNECT. + +WWW: http://search.cpan.org/dist/Plack-Middleware-MethodOverride/ Added: head/www/p5-Plack-Middleware-MethodOverride/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Plack-Middleware-MethodOverride/pkg-plist Sat Mar 29 08:43:21 2014 (r349490) @@ -0,0 +1,4 @@ +%%SITE_PERL%%/Plack/Middleware/MethodOverride.pm +%%PERL5_MAN3%%/Plack::Middleware::MethodOverride.3.gz +@dirrmtry %%SITE_PERL%%/Plack/Middleware +@dirrmtry %%SITE_PERL%%/Plack