def getresponse(self):
status = self._httprequest.status()<EOL>status_text = self._httprequest.status_text()<EOL>resp_headers = self._httprequest.get_all_response_headers()<EOL>fixed_headers = []<EOL>for resp_header in resp_headers.split('<STR_LIT:\n>'):<EOL><INDENT>if (resp_header.startswith('<STR_LIT:\t>') orresp_header.startswith('<STR_LIT:U+0020>')) and fixed_headers:<EOL><INDENT>fixed_headers[-<NUM_LIT:1>] += resp_header<EOL><DEDENT>else:<EOL><INDENT>fixed_headers.append(resp_header)<EOL><DEDENT><DEDENT>headers = []<EOL>for resp_header in fixed_headers:<EOL><INDENT>if '<STR_LIT::>' in resp_header:<EOL><INDENT>pos = resp_header.find('<STR_LIT::>')<EOL>headers.append(<EOL>(resp_header[:pos].lower(), resp_header[pos + <NUM_LIT:1>:].strip()))<EOL><DEDENT><DEDENT>body = self._httprequest.response_body()<EOL>length = len(body)<EOL>return _Response(status, status_text, length, headers, body)<EOL>
Gets the response and generates the _Response object