svn commit: r349490 - in head/www: . p5-Plack-Middleware-MethodOverride
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sat Mar 29 08:43:23 UTC 2014
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 <sunpoet at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= Plack-Middleware-MethodOverride
+PORTVERSION= 0.10
+CATEGORIES= www perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= sunpoet at 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 <bsd.port.mk>
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
+ at dirrmtry %%SITE_PERL%%/Plack/Middleware
+ at dirrmtry %%SITE_PERL%%/Plack
More information about the svn-ports-head
mailing list