这个东西蛮朴素的。。。
import web
urls = (
'/(.*)', 'hello'
)
app = web.application(urls, globals())
class hello:
def GET(self, name):
client = [ web.ctx.env.get('HTTP_REFERER', 'http://google.com') ,
web.ctx.ip ,
web.ctx.host ,
web.ctx.status ,
web.ctx.headers
]
return client
if __name__ == "__main__":
app.run()