Changeset 1728

Show
Ignore:
Timestamp:
01/10/06 22:34:06
Author:
miyagawa
Message:

0.08: added Opera hack

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Catalyst-View-JSON/trunk/Changes

    r1727 r1728  
    11Revision history for Perl extension Catalyst::View::JSON 
     2 
     30.08  Tue Jan 10 13:31:39 UTC 2006 
     4        - Added Opera hack (Content-Type: applcation/x-javascript) 
     5          (Thanks to kazeburo) 
    26 
    370.07  Tue Jan 10 13:00:19 UTC 2006 
  • Catalyst-View-JSON/trunk/lib/Catalyst/View/JSON.pm

    r1727 r1728  
    22 
    33use strict; 
    4 our $VERSION = '0.07'; 
     4our $VERSION = '0.08'; 
    55 
    66use base qw( Catalyst::View ); 
     
    8787    } 
    8888 
    89     $c->res->content_type("text/javascript; charset=$encoding"); 
     89    if (($c->req->user_agent || '') =~ /Opera/) { 
     90        $c->res->content_type("application/x-javascript; charset=$encoding"); 
     91    } else { 
     92        $c->res->content_type("text/javascript; charset=$encoding"); 
     93    } 
    9094 
    9195    my $output;