I'm a newbie in Tornado. And I begin my learning with “Hello World" code like this:

import tornado.ioloop
import tornado.web
import tornado.httpserver

class HelloHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world!")

application = tornado.web.Application([
    (r"/", HelloHandler)
])

http_server = tornado.httpserver.HTTPServer(application)

if __name__ == "__main__":
    http_server.listen(80)
    # http_server.listen(443)
    tornado.ioloop.IOLoop.instance().start()

When I entered "http://localhost" at the browser, it works and prints

"Hello, world!"

But if I tried the request "https://localhost", it returns with:

Error 102 (net::ERR_CONNECTION_REFUSED): The server refused the connection.

There are too little documents about Tornado online, who can tell me how to deal with Https protocol request?

Edit
Report