On Wed, Oct 14, 2009 at 10:58 AM, Gary H-S < [email protected]> wrote:
> > > The returnURL function returns a string that is the currently > requested URL. If the event requested is the loginform event, then the > value is set to only the http host (e.g. the default event of the MG > application): > > <cffunction name="returnURL" access="private" returntype="string" > output="false"> > <cfargument name="event" type="any" /> > <cfscript> > var s = "http://#cgi.http_host##cgi.script_name#? > #cgi.query_string#"; > if (FindNoCase('loginform',s) gt 0) { > s = "http://#cgi.http_host#"; > } > return s; > </cfscript> > </cffunction> > I have a suggestion for you. If the original URL was the target of a POST or other non-GET request, then a cflocation back to that URL is unlikely to work as intended (since HTTP redirects cannot submit form data). I suggest adding a condition to the if statement: if (FindNoCase('loginform',s) gt 0 or cgi.request_method neq "get") { s = "http://#cgi.http_host#"; } Cheers, -- Dennis --~--~---------~--~----~------------~-------~--~----~ Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en -~----------~----~----~----~------~----~------~--~---
