def do_POST(self):
global http_session, session_disabled<EOL>self.process_url()<EOL>self.process_post_data()<EOL>path = self.path<EOL>data = self.data<EOL>query = self.query<EOL>if '<STR_LIT>' == path:<EOL><INDENT>if data['<STR_LIT>'] == self.auth['<STR_LIT:email>'] and data['<STR_LIT>'] == self.auth['<STR_LIT:password>']:<EOL><INDENT>self.send_headers(<NUM_LIT>, {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:Content-Type>': '<STR_LIT>',<EOL>'<STR_LIT:location>': '<STR_LIT>'<EOL>})<EOL>return<EOL><DEDENT>else:<EOL><INDENT>self.output_file('<STR_LIT>')<EOL><DEDENT><DEDENT>elif '<STR_LIT>' == path and '<STR_LIT>' in data and data['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>ver = '<STR_LIT:1>'<EOL>if '<STR_LIT>' in http_session:<EOL><INDENT>ver = http_session['<STR_LIT>']<EOL><DEDENT>self.output_file('<STR_LIT>'.format(ver))<EOL><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>if data['<STR_LIT>'] == '<STR_LIT:default>':<EOL><INDENT>self.output_file('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>self.output_file('<STR_LIT>')<EOL><DEDENT><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>if '<STR_LIT>' in data and data['<STR_LIT>'].strip() != '<STR_LIT>':<EOL><INDENT>self.output_file('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>self.write('<STR_LIT>')<EOL><DEDENT><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>if '<STR_LIT>' in query:<EOL><INDENT>if '<STR_LIT>' == query['<STR_LIT>']:<EOL><INDENT>http_session['<STR_LIT>'] = query['<STR_LIT>']<EOL>self.output_file('<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' == query['<STR_LIT>']:<EOL><INDENT>http_session['<STR_LIT>'] = query['<STR_LIT>']<EOL>self.output_file('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>self.write('<STR_LIT>'.format(query.method))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.write('<STR_LIT>')<EOL><DEDENT><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>self.output_file('<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>session_disabled = True<EOL>http_session = {}<EOL>self.write('<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>session_disabled = False<EOL>self.write('<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' == path:<EOL><INDENT>if session_disabled is True:<EOL><INDENT>self.write('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>for key, value in data.items():<EOL><INDENT>self.add_session(key, value)<EOL><DEDENT>self.send_headers(<NUM_LIT>, {'<STR_LIT:location>': '<STR_LIT>'})<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.write('<STR_LIT>')<EOL><DEDENT>
Process at POST request