static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
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)
+static void php_session_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode 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;
+ *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);
} 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)
-{
- zend_bool do_flush;
-
- if (mode&PHP_OUTPUT_HANDLER_END) {
- do_flush=1;
- }
- if (session_adapt_uris(output, output_len, handled_output, handled_output_len, do_flush TSRMLS_CC)==FAILURE) {
*handled_output = NULL;
}
}