Re: PB with trans-sid

From: Date: Mon, 03 Jul 2000 16:46:28 +0000
Subject: Re: PB with trans-sid
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23338@lists.php.net to get a copy of this message
On Mon, 3 Jul 2000, Hartmut Holzgraefe wrote: > Stanislav Malyshev wrote: > > Martin Rogard wrote: > > > > I have problems with phpsessid, the phpsessid=xxx is written before certain > > other vars. > > For example I got: > > > > http://www.mydomain.net/foo.vhtml?page=units&PHPSESSID=01914f3d154ebc79056681840ee6245a&lang=en > > MR>> 1. Is there a way for PHPSESSID to be written at the end of the url > > > > Why do you care? > > there is some problem related to the interaction of output buffering > (i guess) and --trans-sid-id url rewriting > > the problem is that the function performing the actual rewrite > (url_scanner() in ext/standard/url_scanner.c) will be provided > with chunks of data that may contain incomplete parts of an url > spanning across a buffer boundary > > as the url_scanner() does not know that it was provided with > incomplete data it will attach the session id parameter to the > end of the url as it appears in the buffer passed into it as a > parameter, and in the next step the remaining part of the url > located at the very beginning of the next chunk of output is > appended to the session id parameter just added, with the final > result of an url with the session id parameter stuffed into the > middle of the url Correct analysis. The fix is to make the url scanner context-sensitive, so that it will buffer and correctly patch URLs. Please use output buffering in the meantime. - Sascha

« previous php.dev (#23338) next »