Skip to content

Commit

Permalink
The REMOTE_ADDR CGI field is required.
Browse files Browse the repository at this point in the history
The CGI spec defines it as required and WSGI builds on CGI, so there ya
go.
  • Loading branch information
Christian Wyglendowski committed Oct 21, 2011
1 parent 4a209be commit 7671631
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions diesel/protocols/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def build_wsgi_env(req, port):
env['SERVER_NAME'] = HOSTNAME
env['SERVER_PORT'] = str(port)
env['SERVER_PROTOCOL'] = 'HTTP/' + req.version
env['REMOTE_ADDR'] = req.remote_addr[0]
for name, v in req.headers.iteritems():
env['HTTP_%s' % cgiish_name(name)] = v[0]

Expand Down

0 comments on commit 7671631

Please sign in to comment.