Changeset 1767
- Timestamp:
- 10/26/07 02:33:28
- Files:
-
- trunk/cherrypy/__init__.py (modified) (1 diff)
- trunk/cherrypy/_cpmodpy.py (modified) (1 diff)
- trunk/cherrypy/_cprequest.py (modified) (1 diff)
- trunk/cherrypy/_cpserver.py (modified) (2 diffs)
- trunk/cherrypy/lib/cptools.py (modified) (1 diff)
- trunk/cherrypy/restsrv/servers.py (modified) (1 diff)
- trunk/cherrypy/test/test_http.py (modified) (1 diff)
- trunk/cherrypy/test/test_objectmapping.py (modified) (1 diff)
- trunk/cherrypy/tutorial/tutorial.conf (modified) (1 diff)
- trunk/cherrypy/wsgiserver/__init__.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/__init__.py
r1757 r1767 264 264 __metaclass__ = _AttributeDocstrings 265 265 266 request = _cprequest.Request(_http.Host(" localhost", 80),267 _http.Host(" localhost", 1111))266 request = _cprequest.Request(_http.Host("127.0.0.1", 80), 267 _http.Host("127.0.0.1", 1111)) 268 268 request__doc = """ 269 269 The request object for the current thread. In the main thread, trunk/cherrypy/_cpmodpy.py
r1690 r1767 62 62 resides in the global site-package this won't be needed. 63 63 64 Then restart apache2 and access http:// localhost:808064 Then restart apache2 and access http://127.0.0.1:8080 65 65 """ 66 66 trunk/cherrypy/_cprequest.py
r1765 r1767 168 168 169 169 # Conversation/connection attributes 170 local = http.Host(" localhost", 80)170 local = http.Host("127.0.0.1", 80) 171 171 local__doc = \ 172 172 "An http.Host(ip, port, hostname) object for the server socket." 173 173 174 remote = http.Host(" localhost", 1111)174 remote = http.Host("127.0.0.1", 1111) 175 175 remote__doc = \ 176 176 "An http.Host(ip, port, hostname) object for the client socket." trunk/cherrypy/_cpserver.py
r1752 r1767 35 35 36 36 s1 = MyWSGIServer(host='0.0.0.0', port=80) 37 s2 = another.HTTPServer(host=' localhost', SSL=True)37 s2 = another.HTTPServer(host='127.0.0.1', SSL=True) 38 38 cherrypy.server.httpservers = {s1: ('0.0.0.0', 80), 39 s2: (' localhost', 443)}39 s2: ('127.0.0.1', 443)} 40 40 # Note we do not use quickstart when we define our own httpservers 41 41 cherrypy.server.start() … … 48 48 socket_port = 8080 49 49 50 _socket_host = ' localhost'50 _socket_host = '127.0.0.1' 51 51 def _get_socket_host(self): 52 52 return self._socket_host trunk/cherrypy/lib/cptools.py
r1614 r1767 124 124 port = cherrypy.request.local.port 125 125 if port == 80: 126 base = ' localhost'126 base = '127.0.0.1' 127 127 else: 128 base = ' localhost:%s' % port128 base = '127.0.0.1:%s' % port 129 129 130 130 if base.find("://") == -1: trunk/cherrypy/restsrv/servers.py
r1752 r1767 19 19 20 20 s1 = MyWSGIServer(host='0.0.0.0', port=80) 21 s2 = another.HTTPServer(host=' localhost', SSL=True)21 s2 = another.HTTPServer(host='127.0.0.1', SSL=True) 22 22 server.httpservers = {s1: ('0.0.0.0', 80), 23 s2: (' localhost', 443)}23 s2: ('127.0.0.1', 443)} 24 24 server.start() 25 25 trunk/cherrypy/test/test_http.py
r1727 r1767 32 32 # will hang. Verify that CP times out the socket and responds 33 33 # with 411 Length Required. 34 c = httplib.HTTPConnection(" localhost:%s" % self.PORT)34 c = httplib.HTTPConnection("127.0.0.1:%s" % self.PORT) 35 35 c.request("POST", "/") 36 36 self.assertEqual(c.getresponse().status, 411) trunk/cherrypy/test/test_objectmapping.py
r1764 r1767 243 243 244 244 # Test absoluteURI's in the Request-Line 245 self.getPage('http:// localhost/')245 self.getPage('http://127.0.0.1/') 246 246 self.assertBody('world') 247 247 trunk/cherrypy/tutorial/tutorial.conf
r1598 r1767 1 1 [global] 2 server.socket_host = " localhost"2 server.socket_host = "127.0.0.1" 3 3 server.socket_port = 8080 4 4 server.thread_pool = 10 trunk/cherrypy/wsgiserver/__init__.py
r1766 r1767 13 13 14 14 server = wsgiserver.CherryPyWSGIServer( 15 (' localhost', 8070), my_crazy_app,16 server_name=' localhost')15 ('0.0.0.0', 8070), my_crazy_app, 16 server_name='www.cherrypy.example') 17 17 18 18 The CherryPy WSGI server can serve as many WSGI applications … … 868 868 869 869 protocol = "HTTP/1.1" 870 _bind_addr = " localhost"870 _bind_addr = "127.0.0.1" 871 871 version = "CherryPy/3.1alpha" 872 872 ready = False

