Commits

Anonymous committed 047efe3

Takes care of query string when a RequestRedirect raises by werkzeug's routing system.
(fixes #42)

  • Participants
  • Parent commits d20ca6a

Comments (0)

Files changed (1)

   Map, Submount, RequestRedirect, EndpointPrefix
 )
 from werkzeug.utils import import_string
+from werkzeug.urls import url_encode
 from jinja2 import (
   Environment, Undefined,
 )
     if self._request_middleware is None:
       self.load_middleware()
     try:
-      endpoint, values = local.url_adapter.match()
+      try:
+        endpoint, values = local.url_adapter.match()
+      except RequestRedirect, e:
+        if request.args:
+          e.new_url += '?' + url_encode(request.args)
+        raise e
       if self.app_settings.IS_MARKETPLACE_APP:
         if values.has_key(settings.MARKETPLACE_DOMAIN_NAME_KEY):
           setattr(request, settings.MARKETPLACE_DOMAIN_NAME_KEY,