def _parse_and_validate_query_string(self, query_string): query_params = parse_qs(query_string) http_status = int(query_params["http_status"][0]) message = query_params.get("bt_message") if message is not None: message = message[0] if Http.is_error_status(http_status): Http.raise_exception_from_status(http_status, message) if not self._is_valid_tr_query_string(query_string): raise ForgedQueryStringError return query_params
def _parse_and_validate_query_string(self, query_string): query_params = cgi.parse_qs(query_string) http_status = int(query_params["http_status"][0]) message = query_params.get("bt_message") if message != None: message = message[0] if Http.is_error_status(http_status): Http.raise_exception_from_status(http_status, message) if not self._is_valid_tr_query_string(query_string): raise ForgedQueryStringError return query_params
def parse_and_validate_query_string(query_string): query_params = cgi.parse_qs(query_string) http_status = int(query_params["http_status"][0]) message = query_params.get("bt_message") if message != None: message = message[0] if Http.is_error_status(http_status): Http.raise_exception_from_status(http_status, message) if not TransparentRedirect.is_valid_tr_query_string(query_string): raise ForgedQueryStringError return query_params