Skip Menu |
 

This queue is for tickets about the Devel-ebug-HTTP CPAN distribution.

Report information
The Basics
Id: 29964
Status: resolved
Priority: 0/
Queue: Devel-ebug-HTTP

People
Owner: Nobody in particular
Requestors: peter [...] makholm.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.31
Fixed in: (no value)



Subject: use Catalyst::Plugin::Static::Simple for static files
Download (untitled) / with headers
text/plain 243b
Catalyst::Plugin::Static doesn't seem to be buildable with latest Catalyst and Catalyst::Plugin::Static::Simple seems to be the best supported way. The attached patch changes Devel::ebug::HTTP to use Catalyst::Plugin::Staticc::Simple instead.
Subject: useStaticSimple.patch
diff -Nur ebug-http/Makefile.PL ebug-http.new/Makefile.PL --- ebug-http/Makefile.PL 2006-03-06 19:36:09.000000000 +0000 +++ ebug-http.new/Makefile.PL 2007-10-13 16:49:03.000000000 +0000 @@ -5,7 +5,7 @@ requires Catalyst => '5.64'; requires Test::WWW::Mechanize::Catalyst => 0; -requires Catalyst::Plugin::Static => 0; +requires Catalyst::Plugin::Static::Simple => 0; requires Catalyst::View::TT => 0; requires Devel::ebug => "0.45"; requires HTML::Prototype => 0; diff -Nur ebug-http/lib/Devel/ebug/HTTP.pm ebug-http.new/lib/Devel/ebug/HTTP.pm --- ebug-http/lib/Devel/ebug/HTTP.pm 2006-03-12 20:15:44.000000000 +0000 +++ ebug-http.new/lib/Devel/ebug/HTTP.pm 2007-10-13 16:49:51.000000000 +0000 @@ -1,7 +1,7 @@ package Devel::ebug::HTTP; use strict; use warnings; -use Catalyst qw/Static/; +use Catalyst qw/Static::Simple/; #use Catalyst qw/-Debug Static/; use Catalyst::View::TT; use Cwd; @@ -77,30 +77,6 @@ $context->response->output($result); } -sub css : Regex('(?i)\.(?:css)') { - my($self, $c) = @_; - $c->res->headers->header('Cache-Control' => 'max-age=60'); - $c->serve_static("text/css"); -} - -sub js : Regex('(?i)\.(?:js)') { - my($self, $c) = @_; - $c->res->headers->header('Cache-Control' => 'max-age=60'); - $c->serve_static("application/x-javascript"); -} - -sub ico : Regex('(?i)\.(?:ico)') { - my($self, $c) = @_; - $c->res->headers->header('Cache-Control' => 'max-age=60'); - $c->serve_static("image/vnd.microsoft.icon"); -} - -sub images : Regex('(?i)\.(?:gif|jpg|png)') { - my($self, $c) = @_; - $c->res->headers->header('Cache-Control' => 'max-age=60'); - $c->serve_static; -} - sub end : Private { my($self, $c) = @_; if ($c->stash->{template}) {


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.