Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1347

Show
Ignore:
Timestamp:
09/10/06 17:05:13
Author:
fumanchu
Message:

Tweaks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpserver.py

    r1345 r1347  
    9999    def _start_http(self, httpserver): 
    100100        """Start the given httpserver in a new thread.""" 
     101        scheme = "http" 
     102        if getattr(httpserver, "ssl_certificate", None): 
     103            scheme = "https" 
    101104        bind_addr = self.httpservers[httpserver] 
    102105        if isinstance(bind_addr, tuple): 
     
    105108            if not host: 
    106109                host = '0.0.0.0' 
    107             on_what = "http://%s:%s/" % (host, port) 
     110            on_what = "%s://%s:%s/" % (scheme, host, port) 
    108111        else: 
    109112            on_what = "socket file: %s" % bind_addr 
     
    114117         
    115118        self.wait(httpserver) 
    116         cherrypy.log("Serving HTTP on %s" % on_what, 'HTTP') 
     119        cherrypy.log("Serving %s on %s" % (scheme.upper(), on_what), 'HTTP') 
    117120     
    118121    def _start_http_thread(self, httpserver): 
  • trunk/cherrypy/test/test_core.py

    r1345 r1347  
    775775        if cherrypy.server.protocol_version == "HTTP/1.1": 
    776776            # Test RFC-2047-encoded request and response header values 
    777             self.getPage("/headers/ifmatch", 
    778                          [('If-Match', '=?utf-8?q?=E2=84=ABngstr=C3=B6m?=')]) 
     777            c = "=E2=84=ABngstr=C3=B6m" 
     778            self.getPage("/headers/ifmatch", [('If-Match', '=?utf-8?q?%s?=' % c)]) 
    779779            self.assertBody("u'\\u212bngstr\\xf6m'") 
    780780            self.assertHeader("ETag", '=?utf-8?b?4oSrbmdzdHLDtm0=?=') 
    781781             
    782782            # Test a *LONG* RFC-2047-encoded request and response header value 
    783             c = "=E2=84=ABngstr=C3=B6m" 
    784783            self.getPage("/headers/ifmatch", 
    785784                         [('If-Match', '=?utf-8?q?%s?=' % (c * 10))]) 

Hosted by WebFaction

Log in as guest/cpguest to create tickets