Commits

Lynn Rees  committed 9d7d724

[svn]

  • Participants
  • Parent commits 4f8f028
  • Branches urlrelay

Comments (0)

Files changed (2)

File branches/0.5.1/tags/test.py

-import urlrelay
-
-@urlrelay.url('^/$')
-def app(environ, start_response):
-    start_response('200 OK', [('Content-Type', 'text/plain')])
-    return ['You have logged in. Your IP is %s' % str(environ['SCRIPT_NAME'] + environ['PATH_INFO'])]
-
-@urlrelay.url('^/thing$', 'GET')
-def thing(environ, start_response):
-    start_response('200 OK', [('Content-Type', 'text/plain')])
-    return ['You have logged in here too.']
-
-#urls = (('^/$', app), ('^/thing$', thing))
-
-if __name__ == '__main__':
-    from wsgiref.simple_server import make_server
-    http = make_server('', 8080, urlrelay.URLRelay())
-    http.serve_forever()

File branches/0.6/tags/test.py

-import urlrelay
-
-@urlrelay.url('^/$')
-def app(environ, start_response):
-    start_response('200 OK', [('Content-Type', 'text/plain')])
-    return ['You have logged in. Your IP is %s' % str(environ['SCRIPT_NAME'] + environ['PATH_INFO'])]
-
-@urlrelay.url('^/thing$', 'GET')
-def thing(environ, start_response):
-    start_response('200 OK', [('Content-Type', 'text/plain')])
-    return ['You have logged in here too.']
-
-#urls = (('^/$', app), ('^/thing$', thing))
-
-if __name__ == '__main__':
-    from wsgiref.simple_server import make_server
-    from wsgiref.validate import validator
-    http = make_server('', 8080, validator(urlrelay.URLRelay()))
-    http.serve_forever()