Hi folks, I recently revisted a couple of  older project to update it and
bring it up to current python packages. It's now running on Pyramid 1.5.
All went pretty smoothly except for one of them, the redirects are not
working. They both use my internal tools so have very similar code, but on
one of them, when I either raise or return an HTTPFound, the app redirects
to a URL where every letter of the base url has an extra comma like so:

http://g,o,d,e,l,t,a,s,t,a,g,i,n,g,.,x,o,r,n,o,t,.,c,o,m/test_target

I even made a bog standard simple test redirect and target with no wrapper
view action to try this out and it's still happening. The code and zcml
registrations for it are below:

If anyone has seen anything like this before and might have any idea what
other parts of the app might be doing this, I'm all ears! Thanks!

Iain

Code:
from pyramid.httpexceptions import HTTPFound
from pyramid.response import Response

import logging
log = logging.getLogger(__name__)
import pdb

def test_redirect(request):
    log.info("test_redirect view redirecting to /test_target")
    return HTTPFound(location="/test_target")


def test_target(request):
    log.info("test target view")
    return Response("The target view")


View registrations:
  <!-- debugging view -->
  <route name="test_redirect" path="/test_redirect" />
  <view
    view=".views.redirect.test_redirect"
    route_name="test_redirect"
  />
  <route name="test_target" path="/test_target" />
  <view
    view=".views.redirect.test_target"
    route_name="test_target"
  />

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to