Changeset 1571
- Timestamp:
- 12/28/06 14:01:51
- Files:
-
- branches/cherrypy-2.x/cherrypy/_cpwsgiserver.py (modified) (1 diff)
- branches/cherrypy-2.x/cherrypy/lib/httptools.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-2.x/cherrypy/_cpwsgiserver.py
r1527 r1571 324 324 # Get the correct address family for our host (allows IPv6 addresses) 325 325 host, port = self.bind_addr 326 flags = 0 327 if host == '': 328 # Despite the socket module docs, using '' does not 329 # allow AI_PASSIVE to work. Passing None instead 330 # returns '0.0.0.0' like we want. 331 host = None 332 flags = socket.AI_PASSIVE 326 333 try: 327 334 info = socket.getaddrinfo(host, port, socket.AF_UNSPEC, 328 socket.SOCK_STREAM )335 socket.SOCK_STREAM, 0, flags) 329 336 except socket.gaierror: 330 337 # Probably a DNS issue. Assume IPv4. branches/cherrypy-2.x/cherrypy/lib/httptools.py
r1569 r1571 561 561 562 562 def __iter__(self): 563 return self .rfile563 return self 564 564 565 565 def next(self): … … 567 567 self.bytes_read += len(data) 568 568 self._check_length() 569 ## Normally the next method must raise StopIteration when it570 ## fails but CP expects MaxSizeExceeded571 ## try:572 ## self._check_length()573 ## except:574 ## raise StopIteration()575 569 return data 576 570

