Skip to content

Commit

Permalink
listen on 127.0.0.1 by default instead of 0.0.0.0
Browse files Browse the repository at this point in the history
There shouldn't be any worries about opening up an
unsecured application just because it is run with
the defaults.
  • Loading branch information
serverhorror committed Mar 8, 2011
1 parent 87a142d commit f89041c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/application.py
Expand Up @@ -133,7 +133,7 @@ def add_processor(self, processor):
self.processors.append(processor)

def request(self, localpart='/', method='GET', data=None,
host="0.0.0.0:8080", headers=None, https=False, **kw):
host="127.0.0.1:8080", headers=None, https=False, **kw):
"""Makes request to this application for the specified path and method.
Response will be a storage object with data, status and headers.
Expand Down Expand Up @@ -161,10 +161,10 @@ def request(self, localpart='/', method='GET', data=None,
...
>>> response = app.request("/redirect")
>>> response.headers['Location']
'http://0.0.0.0:8080/foo'
'http://127.0.0.1:8080/foo'
>>> response = app.request("/redirect", https=True)
>>> response.headers['Location']
'https://0.0.0.0:8080/foo'
'https://127.0.0.1:8080/foo'
The headers argument specifies HTTP headers as a mapping object
such as a dict.
Expand Down

0 comments on commit f89041c

Please sign in to comment.