aodag/WebDispatch — Issue #8: urlgenerator generate 'http://localhost//' from app.add_route('top', '/', someapp)
Author: shimizukawa
Created: 2012-02-02 10:06:09+00:00
State: open

urlgenerator.generate can't reverse '/' path?

code:

from webdispatch import URLDispatcher
from wsgiref.simple_server import make_server
from webob.dec import wsgify

@wsgify
def top(request):
return request.environ['webdispatch.urlgenerator'].generate('top')

app = URLDispatcher()
app.add_url('top', '/', top)
httpd = make_server('', 8000, app)
httpd.serve_forever()

This application print "http://localhost:8000//", but "//" is not correct.