Welcome Guest, Not a member yet? Register   Sign In
Missing CI_Output::set_content_type()
#1

[eluser]Unknown[/eluser]
I'm attempting to preform a XSS request. I have two sites dev.blah.com and internal.blah.com both domains sit on the same server.

internal.blah.com - This domain is where I have all the libraries and models that produce JSON objects. Based on the correct controller call I echo correctly formated JSON data to the screen (with content-type: text/html).

dev.blah.com - Is where I'm attempting to preform a jquery $.ajax post to return my well formed JSON object.
Code:
$.ajax({
  type: 'GET',
  url: 'http://internal.lyntron.com/completePart/returnPartObject/'+completePartId+'/JSON',
  dataType: 'jsonp',
  jsonp: false,
  crossDomain: true,
  contentType: "'application/json; charset=utf-8'",
  success: function(partObj) {
    alert("it worked");
  }
});

I've tested my code at internal.blah.com and validated the JSON syntax. My crap is correct! But on the dev site I'm getting a javascript error "uncaught SyntaxError: Unexpected token <".

In all of my research I've found that this is probably due to the fact that I'm returning 'text/html' instead of 'application/json'. So...

CI has an excellent function call set_content_type() that is part of the output class, however when I call it I get a nasty error message.
Code:
Fatal error: Call to undefined method CI_Output::set_content_type() in /usr/local/www/htdocs/blah.com/internal/system/application/controllers/completePart.php on line 48

Are there any ideas out there how I can get around this error and make my XSS dreams come true?


Messages In This Thread
Missing CI_Output::set_content_type() - by El Forum - 03-21-2011, 12:07 PM
Missing CI_Output::set_content_type() - by El Forum - 03-21-2011, 04:36 PM
Missing CI_Output::set_content_type() - by El Forum - 03-21-2011, 05:30 PM
Missing CI_Output::set_content_type() - by El Forum - 03-21-2011, 10:55 PM
Missing CI_Output::set_content_type() - by El Forum - 03-22-2011, 02:10 AM
Missing CI_Output::set_content_type() - by El Forum - 03-22-2011, 11:56 AM
Missing CI_Output::set_content_type() - by El Forum - 03-22-2011, 07:25 PM
Missing CI_Output::set_content_type() - by El Forum - 03-23-2011, 05:23 AM
Missing CI_Output::set_content_type() - by El Forum - 03-24-2011, 06:01 PM
Missing CI_Output::set_content_type() - by El Forum - 03-24-2011, 06:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB