cvs: /php4 output.c

From: Date: Sun, 12 Sep 1999 11:36:45 +0000
Subject: cvs: /php4 output.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-4365@lists.php.net to get a copy of this message
sas Sun Sep 12 07:36:45 1999 EDT Modified files: /php4 output.c Log: move session URL stuff to the last place before SAPI takes over Index: php4/output.c diff -u php4/output.c:1.18 php4/output.c:1.19 --- php4/output.c:1.18 Sat Sep 11 23:25:02 1999 +++ php4/output.c Sun Sep 12 07:36:45 1999 @@ -184,14 +184,29 @@ static int php_ub_body_write_no_header(const char *str, uint str_length) { - return php_header_write(str, str_length); + char *newstr = NULL; + uint new_length; + int result; + + session_adapt_uris(str, str_length, &newstr, &new_length); + + if (newstr) { + str = newstr; + str_length = new_length; + } + + result = php_header_write(str, str_length); + + if (newstr) { + free(newstr); + } + + return result; } static int php_ub_body_write(const char *str, uint str_length) { - char *newstr = NULL; - uint new_length; int result = 0; SLS_FETCH(); @@ -199,19 +214,8 @@ zend_bailout(); } if (php3_header()) { - session_adapt_uris(str, str_length, &newstr, &new_length); - - if (newstr) { - str = newstr; - str_length = new_length; - } - php_body_write = php_ub_body_write_no_header; result = php_ub_body_write_no_header(str, str_length); - - if (newstr) { - free(newstr); - } } return result;

« previous php.version4 (#4365) next »