added PHPSESSID cookie to uri key possibilities

This commit is contained in:
Peter Molnar 2013-06-17 14:22:46 +01:00
parent 23ee5f0109
commit cdd4f4e6c6
3 changed files with 12 additions and 4 deletions

View file

@ -141,7 +141,7 @@ if ( array_key_exists( "HTTP_IF_MODIFIED_SINCE" , $_SERVER ) && !empty( $wp_ffpc
/*** SERVING CACHED PAGE ***/
/* if we reach this point it means data was found & correct, serve it */
header('Content-Type: ' . $wp_ffpc_values['meta']['mime']);
if ( isset( $wp_ffpc_values['meta']['mime'] )) header('Content-Type: ' . $wp_ffpc_values['meta']['mime']);
/* don't allow browser caching of page */
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0');

View file

@ -62,11 +62,17 @@ if (!class_exists('WP_FFPC_Backend')) {
$this->utilities = WP_Plugins_Utilities_v1::Utility();
$ruser = isset ( $_SERVER['REMOTE_USER'] ) ? $_SERVER['REMOTE_USER'] : '';
$ruri = isset ( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '';
$rhost = isset ( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '';
$scookie = isset ( $_COOKIE['PHPSESSID'] ) ? $_COOKIE['PHPSESSID'] : '';
$this->urimap = array(
'$scheme' => str_replace ( '://', '', $this->utilities->replace_if_ssl ( 'http://' ) ),
'$host' => $_SERVER['HTTP_HOST'],
'$request_uri' => $_SERVER['REQUEST_URI'],
'$remote_user' => $_SERVER['REMOTE_USER'],
'$host' => $rhost,
'$request_uri' => $ruri,
'$remote_user' => $ruser,
'$cookie_PHPSESSID' => $scookie,
);
/* no config, nothing is going to work */
@ -82,6 +88,7 @@ if (!class_exists('WP_FFPC_Backend')) {
$this->log ( __translate__('init starting', $this->plugin_constant ));
$this->$init();
}
/*********************** PUBLIC FUNCTIONS ***********************/

View file

@ -134,6 +134,7 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
'$host' => __('Host in the header of request or name of the server processing the request if the Host header is not available.', $this->plugin_constant ),
'$request_uri' => __('The *original* request URI as received from the client including the args', $this->plugin_constant ),
'$remote_user' => __('Name of user, authenticated by the Auth Basic Module', $this->plugin_constant ),
'$cookie_PHPSESSID' => __('PHP Session Cookie ID, if set ( empty if not )', $this->plugin_constant ),
//'$cookie_COOKnginy IE' => __('Value of COOKIE', $this->plugin_constant ),
//'$http_HEADER' => __('Value of HTTP request header HEADER ( lowercase, dashes converted to underscore )', $this->plugin_constant ),
//'$query_string' => __('Full request URI after rewrites', $this->plugin_constant ),