#!/usr/bin/env python
# -*- coding: utf-8 -*- 

import BaseHTTPServer

class HTTPUploadHandler(BaseHTTPServer.BaseHTTPRequestHandler):
    def do_GET(self):
        print self.address_string() # debug 
        self.wfile.write("Hello sbis!")
        
def main():
    port=8000
    server_address = ('', port)
    HTTPUploadHandler.protocol_version = "HTTP/1.0"
    httpd = BaseHTTPServer.HTTPServer(server_address, HTTPUploadHandler)
    try:
        print "HTTP server running... Check it out at http://localhost:%d"%port
        httpd.serve_forever()
    except KeyboardInterrupt:
        print '^C received, shutting down server'
        # some threads may run until they terminate
        
if __name__ == '__main__':
    main()
