madeon wrote in changelog

[ljcom] r12263: LJSUP-12894: jsonp doesn't work at all

Committer: sbelyaev
LJSUP-12894: jsonp doesn't work at all
U   trunk/cgi-bin/LJ/Response/JSON.pm
Modified: trunk/cgi-bin/LJ/Response/JSON.pm
===================================================================
--- trunk/cgi-bin/LJ/Response/JSON.pm	2012-07-11 07:42:03 UTC (rev 12262)
+++ trunk/cgi-bin/LJ/Response/JSON.pm	2012-07-11 07:53:35 UTC (rev 12263)
@@ -20,12 +20,14 @@
 
     if ($self->data) {
         LJ::Request->content_type($self->content_type);
-        my $output = $self->do_gzip (LJ::JSON->to_json( $self->data ));
+        my $output = LJ::JSON->to_json( $self->data );
 
         if ($self->callback) {
             $output = $self->callback . "($output)";
         }
 
+        $output = $self->do_gzip ($output);
+        
         LJ::Request->header_out("Content-length", length $output);
         LJ::Request->send_http_header();
         unless (LJ::Request->header_only) {
@@ -35,3 +37,4 @@
 }
 
 1;
+