> -----Original Message----- > From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On > Behalf Of brian - > > Then it should be Location. > > checking LocationChange and RequestDone for the loc ends in the same final > URL at the end, going from .com to the localized domain
Hello, I would assume 'Location' would be the URL on the RequestDone() event, but how do you determine the current URL in a LocationChange() event? You wouldn't know (for sure) whether it is URL or whether it was the previous value in Location. I think I came up with a method of getting the 'current URL' though, using two variables 'lastloc' and 'currloc': 1. In OnLocationChange(), I set 'lastloc' to Location. 2. In OnRequestHeaderBegin(), I set 'currloc' to the value of 'lastloc' (if it exists). 3. To get the true current location of the request, I check 'currloc' and use that if there is a value assigned, otherwise I use the 'URL' property. If one just uses the 'Location' property, it's not always the current URL - at least not until the OnRequestHeaderBegin() event... in fact, the current URL could be a previous value of 'Location', if there was more than one location change. Am I making sense? :) Does the above method make sense or does someone know an easier way? Or am I making this too complicated? I need the 'real' URL to handle cookies properly. I need the current URL in OnCookie, and if there is a location header before the cookie header, then the Location property is not the current URL for the cookie... the URL property might be, but it could also have been the previous value of Location if there was more than one relocation. See the problem? :) Thanks, Albert -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be