#NEWLINE# def do_GET( self ) : #NEWLINE# #INDENT# 'Handles HTTP GET requests.' #NEWLINE# handler = ( self . uri_map . get ( self . path ) or self . handle_other ) #NEWLINE# ( content , content_type ) = handler ( ) #NEWLINE# self . _send_response ( 200 , headers = ( ( 'Content-type' , ( '%s; charset=utf-8' % content_type ) ) , ( 'Content-Length' , len ( content ) ) ) ) #NEWLINE# if ( ( sys . version_info [ 0 ] >= 3 ) and isinstance ( content , str ) ) : #NEWLINE# #INDENT# self . wfile . write ( bytes ( content_type , 'utf-8' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . wfile . write ( content )