[libmagpie-perl] 05/09: Punt on encoding for now until we find a better way.

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 19:30:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libmagpie-perl.

commit 4c9ee0fa8264ef425c62b7b687e9722493fdd6b8
Author: Kip Hampton <khampton at totalcinema.com>
Date:   Sun Jan 26 09:52:13 2014 -0800

    Punt on encoding for now until we find a better way.
---
 lib/Plack/Middleware/Magpie.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/Plack/Middleware/Magpie.pm b/lib/Plack/Middleware/Magpie.pm
index 864102e..30638d7 100644
--- a/lib/Plack/Middleware/Magpie.pm
+++ b/lib/Plack/Middleware/Magpie.pm
@@ -240,12 +240,16 @@ sub call {
         return $subref->();
     }
 
+    use Encode;
     # XXX: Real Accept-* based serialization will go here eventually.
     #if ($m->resource->has_data) {
     if ( my $data = $m->resource->data ) {
 
         #my $data = $m->resource->data;
         #warn "got data $data\n";
+        #if (!utf8::is_utf8($data)) {
+        #    $data = decode('UTF-8', $data);
+        #}
         my $content_length = length $data || 0;
         if ($content_length) {
             $m->response->content_length($content_length);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmagpie-perl.git



More information about the Pkg-perl-cvs-commits mailing list