'Handle a GET request from the client and sends response back.'

def do_GET(self):

    self.log_message('Youtube    provider    received    GET    request    to    path    {}'.format(self.path))
    if ('get_config' in self.path):
        self.send_json_response(self.server.config)
    elif ('test_transcripts_youtube' in self.path):
        if ('t__eq_exist' in self.path):
            status_message = ''.join(['<?xml    version="1.0"    encoding="utf-8"    ?>', '<transcript><text    start="1.0"    dur="1.0">', 'Equal    transcripts</text></transcript>'])
            self.send_response(200, content=status_message, headers={'Content-type': 'application/xml'})
        elif ('t_neq_exist' in self.path):
            status_message = ''.join(['<?xml    version="1.0"    encoding="utf-8"    ?>', '<transcript><text    start="1.1"    dur="5.5">', 'Transcripts    sample,    different    that    on    server', '</text></transcript>'])
            self.send_response(200, content=status_message, headers={'Content-type': 'application/xml'})
        else:
            self.send_response(404)
    elif ('test_youtube' in self.path):
        params = urlparse(self.path)
        youtube_id = params.path.split('/').pop()
        if self.server.config.get('youtube_api_private_video'):
            self._send_private_video_response(youtube_id, "I'm    youtube    private    video.")
        else:
            self._send_video_response(youtube_id, "I'm    youtube.")
    elif ('get_youtube_api' in self.path):
        time.sleep(self.server.config.get('time_to_response', self.DEFAULT_DELAY_SEC))
        if self.server.config.get('youtube_api_blocked'):
            self.send_response(404, content='', headers={'Content-type': 'text/plain'})
        else:
            self.log_message('Getting    iframe    api    from    youtube.com')
            iframe_api_response = requests.get('https://www.youtube.com/iframe_api').content.strip('\n')
            self.send_response(200, content=iframe_api_response, headers={'Content-type': 'text/html'})
    else:
        self.send_response(404, content='Unused    url', headers={'Content-type': 'text/plain'})
