Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Same code, different results

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


ptomblin at xcski

Aug 22, 2012, 7:22 AM

Post #1 of 1 (182 views)
Permalink
Same code, different results

My code makes an ajax call to a mason file that emits some json. That
mason file uses the exact same techniques that RT's own ajax mason
files use to make sure it isn't polluted with html - it calls
$m->abort after emitting the json. On my Linux box (Ubuntu 12.04,
some dependencies installed with apt-get, but most through CPAN), that
works fine - I get the results I want. On my Mac (Mountain Lion, all
dependencies installed with CPAN), the JSON is polluted with html from
my autohandler and from the default RT autohandler. Can somebody tell
me what is going on, and how do I stop it? I had some luck with using
<%flags>
inherit => undef
</%flags>
but I'm told that's a massive security hole, so I took it out.

Here is the top bit of my ajax handler file:

% $r->content_type('application/json');
% $m->clear_buffer;
<% JSON::to_json( \@suggestions, { utf8 => 1, allow_blessed => 1,
convert_blessed => 1, } ) |n %>
% $m->abort;
<%ARGS>
@field => undef
@value => undef
$current => undef
$term => undef
</%ARGS>
<%INIT>


--
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.