I've spent some more time on the trunk and here are my current issues:
1. There is a bug in _cprequest: (in the run function) with the
following line:
if qs:
self.params = http.parse_query_string(qs)
Even if there is '?' in the url, qs gets set to "" and the params
never get reset. When I remove the <if qs> check from the above line
and everything works. I don't understand in what case would you want
the old parameter's to be passed implicently on an Internal Redirect.
It should be explicit. If you need the old parameters then you should
build them in your url when you raise an InternalRedirect
2. The cherrypy.url() function returns an absolute url and if I pass
that value to cherrypy.InternalRedirect it fails.
cherrypy.InternalRedirect only works with relative urls. Eitehr we
should make cherrypy.InternalRedirect work with both absolute or
relative urls or should have cherrypy.url just show the relative urls.
I wrote the following function to get around this problem:
def getCurrentPageUrl():
url = cherrypy.url()
urlParts = urlparse(url)
if urlParts[4]:
url = urlParts[2]+ '?' + urlParts[3]
else:
url = urlParts[2]
return urllib.quote(url)
Thanks,
Vineet
founder, www.eswap.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to
[hidden email]
To unsubscribe from this group, send email to
[hidden email]
For more options, visit this group at
http://groups-beta.google.com/group/cherrypy-users-~----------~----~----~----~------~----~------~--~---