mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Cleanup
This commit is contained in:
parent
b781720b36
commit
d7149ba8fc
1 changed files with 3 additions and 17 deletions
|
@ -84,25 +84,11 @@ static ps_module *_php_find_ps_module(char *name TSRMLS_DC);
|
||||||
static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
|
static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
|
||||||
static void php_session_end_output_handler(TSRMLS_D);
|
static void php_session_end_output_handler(TSRMLS_D);
|
||||||
|
|
||||||
static int session_adapt_uris(const char *src, size_t srclen, char **new, size_t *newlen, zend_bool do_flush TSRMLS_DC)
|
|
||||||
{
|
|
||||||
if (PS(define_sid) && (PS(session_status) == php_session_active)) {
|
|
||||||
*new = url_adapt_ext_ex(src, srclen, PS(session_name), PS(id), newlen, do_flush TSRMLS_CC);
|
|
||||||
return SUCCESS;
|
|
||||||
} else {
|
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void php_session_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC)
|
static void php_session_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC)
|
||||||
{
|
{
|
||||||
zend_bool do_flush;
|
if (PS(define_sid) && (PS(session_status) == php_session_active)) {
|
||||||
|
*handled_output = url_adapt_ext_ex(output, output_len, PS(session_name), PS(id), handled_output_len, (zend_bool) (mode&PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
|
||||||
if (mode&PHP_OUTPUT_HANDLER_END) {
|
} else {
|
||||||
do_flush=1;
|
|
||||||
}
|
|
||||||
if (session_adapt_uris(output, output_len, handled_output, handled_output_len, do_flush TSRMLS_CC)==FAILURE) {
|
|
||||||
*handled_output = NULL;
|
*handled_output = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue