Ian Bicking avatar Ian Bicking committed 96c94ba

Allow server_address tuples that are longer (specifically for IPv6 support: http://trac.pythonpaste.org/pythonpaste/ticket/275)

Comments (0)

Files changed (1)


         if endslash and path != '/':
             # Put the slash back...
             path += '/'
-        (server_name, server_port) = self.server.server_address
+        (server_name, server_port) = self.server.server_address[:2]
         rfile = self.rfile
         if 'HTTP/1.1' == self.protocol_version and \
         threadpool.  See paste.httpserver.ThreadPool for specific
         options (``threadpool_workers`` is a specific option that can
         also go here).
         The 'backlog' argument to socket.listen(); specifies the
     if converters.asbool(start_loop):
         protocol = is_ssl and 'https' or 'http'
-        host, port = server.server_address
+        host, port = server.server_address[:2]
         if host == '':
             print 'serving on view at %s://' % \
                 (port, protocol, port)
         When threads are killed or the process restarted, this email
         address will be contacted (using an SMTP server on localhost).
     #serve(dump_environ, ssl_pem="test.pem")
     serve(dump_environ, server_version="Wombles/1.0",
           protocol_version="HTTP/1.1", port="8888")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.