Welcome Guest, Not a member yet? Register   Sign In
Headers set to no cache are not honored?
#18

[eluser]drewbee[/eluser]
headers with standard PHP header()
Quote:HTTP/1.x 200 OK
Date: Wed, 01 Apr 2009 17:56:02 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1
X-Powered-By: PHP/5.2.9
Expires: Wed, 1 Apr 2009 17:56:04 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Last-Modified: Wed, 01 Apr 2009 17:56:04 GMT
Transfer-Encoding: chunked
Content-Type: text/html
expires=Wed, 01-Apr-2009 19:56:04 GMT; path=/
Proxy-Connection: Keep-Alive

And with CI's header function

Quote:HTTP/1.x 200 OK
Date: Wed, 01 Apr 2009 18:01:36 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1
X-Powered-By: PHP/5.2.9
Transfer-Encoding: chunked
Content-Type: text/html
expires=Wed, 01-Apr-2009 20:01:36 GMT; path=/
Proxy-Connection: Keep-Alive

So this confirms my headers are not being set.

I just dug into the base Codeigniter.php file, and for some reason, call_user_func_array() cleans out the output class var. ????

Line 230-233
Code:
echo print_r($OUT);
        // Call the requested method.
        // Any URI segments present (besides the class/function) will be passed to the method for convenience
        call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));
Outputs:
Code:
CI_Output Object ( [final_output] => [cache_expiration] => 0 [headers] => Array ( [0] => Array ( [0] => Last-Modified: Wed, 1 Apr 2009 18:16:28 GMT [1] => 1 ) [1] => Array ( [0] => Expires: Wed, 1 Apr 2009 18:16:28 GMT [1] => 1 ) [2] => Array ( [0] => Cache-Control: no-store, no-cache, must-revalidate [1] => 1 ) [3] => Array ( [0] => Cache-Control: post-check=0, pre-check=0 [1] => ) [4] => Array ( [0] => Pragma: no-cache [1] => 1 ) ) [enable_profiler] => ) 1

But the following (moved print_r below the function call):
Code:
// Call the requested method.
        // Any URI segments present (besides the class/function) will be passed to the method for convenience
        call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));
                echo print_r($OUT);

Outputs : [empty string] The var is defined, as it doesn't throw any errors; Which makes me think $OUT->_display() doesn't get called. Yet none of my crap would show up if this was not true.

I am officially bewildered to no end.

My template draw() method...

Code:
function draw($data = null)
    {
        $data = array('data'         => $data,
                      'page'         => $this->page);
        $this->CI->load->view('global_template', $data);
    }

The only thing different I see going on here, is that the global template.php file is the one that calls $this->load->view() for all pages within itself. As a test, I simply loaded a base view from draw(). Same effect. I'm not missing some function call that I need to for final rendering of the output class am i? Using $this->CI->output->get_output(); from my template class I ended up with everything doubled.

WTF? lol.


Messages In This Thread
Headers set to no cache are not honored? - by El Forum - 02-19-2009, 12:00 PM
Headers set to no cache are not honored? - by El Forum - 02-23-2009, 02:39 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 05:03 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 05:05 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 06:59 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 07:39 PM
Headers set to no cache are not honored? - by El Forum - 03-30-2009, 11:30 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 10:59 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:11 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:18 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:29 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:39 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:46 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:52 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:58 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:06 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:11 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:36 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:45 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:00 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:13 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:22 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:41 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:45 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:55 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:58 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:02 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:23 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:30 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:44 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 03:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB