[albatross-users] [patch] fastcgi bug fix
Matt Goodall
matt at pollenation.net
Tue Jul 8 08:10:54 EST 2003
Hi,
I don't know how this one got through (!) but I found a bug in the
fcgiapp module. At the same time, I changed the code to look up
dictionary items using get() rather than [] which is a bit more robust.
How can we go about testing all these request adapters other than
running them inside a web server? I guess it should be possible to spoof
a straight CGI quite easily but the others are probably a bit trickier.
- Matt
--
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenation.net
e: matt at pollenation.net
-------------- next part --------------
--- albatross-1.10pre2/albatross/fcgiapp.py 2003-07-05 04:12:16.000000000 +0100
+++ albatross-1.10pre2-patched/albatross/fcgiapp.py 2003-07-07 23:03:53.000000000 +0100
@@ -19,14 +19,14 @@
cgiapp.Request.__init__(self, fields)
def get_uri(self):
- return self.__fcgi.env['REQUEST_URI']
+ return self.__fcgi.env.get('REQUEST_URI')
def get_servername(self):
- return self.__fcgi.env['SERVER_NAME']
+ return self.__fcgi.env.get('SERVER_NAME')
def get_header(self, name):
env_name = 'HTTP_' + name.upper().replace('-', '_')
- return self.__req.env.get(env_name)
+ return self.__fcgi.env.get(env_name)
def running():
More information about the Albatross-users
mailing list