Changeset 583
- Timestamp:
- 08/31/05 13:13:41
- Files:
-
- trunk/cherrypy/_cphttpserver.py (modified) (1 diff)
- trunk/cherrypy/_cphttptools.py (modified) (2 diffs)
- trunk/cherrypy/_cpwsgi.py (modified) (1 diff)
- trunk/cherrypy/server.py (modified) (1 diff)
- trunk/docs/book/xml/apireference.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttpserver.py
r538 r583 84 84 cherrypy.request.multithread = cherrypy.config.get("server.threadPool") > 1 85 85 cherrypy.request.multiprocess = False 86 cherrypy.server.request(self.client_address [0],86 cherrypy.server.request(self.client_address, 87 87 self.address_string(), 88 88 self.raw_requestline, trunk/cherrypy/_cphttptools.py
r580 r583 163 163 """Populate a new Request object. 164 164 165 clientAddress and remoteHost should be IP address strings. 165 clientAddress should be a tuple of client IP address, client Port 166 remoteHost should be string of the client's IP address. 166 167 requestLine should be of the form "GET /path HTTP/1.0". 167 168 headers should be a list of (name, value) tuples. … … 187 188 188 189 # Prepare cherrypy.request variables 189 cherrypy.request.remoteAddr = clientAddress 190 cherrypy.request.remoteAddr = clientAddress[0] 191 cherrypy.request.remotePort = clientAddress[1] 190 192 cherrypy.request.remoteHost = remoteHost 191 193 cherrypy.request.paramList = [] # Only used for Xml-Rpc trunk/cherrypy/_cpwsgi.py
r579 r583 96 96 cherrypy.request.multithread = environ['wsgi.multithread'] 97 97 cherrypy.request.multiprocess = environ['wsgi.multiprocess'] 98 cherrypy.server.request(environ.get('REMOTE_ADDR', ''), 98 clientAddr = ( 99 environ.get('REMOTE_ADDR', ''), 100 int(environ.get('REMOTE_PORT', -1)) 101 ) 102 cherrypy.server.request(clientAddr, 99 103 environ.get('REMOTE_ADDR', ''), 100 104 requestLine(environ), trunk/cherrypy/server.py
r581 r583 173 173 """request(clientAddress, remoteHost, requestLine, headers, rfile, scheme="http") 174 174 175 clientAddress: the IP addressof the client175 clientAddress: the (IP address, port) of the client 176 176 remoteHost: the IP address of the client 177 177 requestLine: "<HTTP method> <url?qs> HTTP/<version>", trunk/docs/book/xml/apireference.xml
r414 r583 22 22 <section> 23 23 <title>cherrypy.request.remoteAddr</title> 24 <para>This attribute is a string containing the IP address of the client.</para> 24 <para>This attribute is a string containing the IP address of the 25 client. It will be an empty string if it is not available.</para> 26 </section> 27 </listitem> 28 <listitem> 29 <section> 30 <title>cherrypy.request.remotePort</title> 31 <para>This attribute is an int containing the TCP port number of 32 the client. It will be -1 if it is not available.</para> 25 33 </section> 26 34 </listitem>

