comparison sat/plugins/plugin_comp_ap_gateway/http_server.py @ 3992:1c84268752a1

component AP gateway: fix bad condition
author Goffi <goffi@goffi.org>
date Fri, 25 Nov 2022 16:34:09 +0100
parents cd0943ceb326
children 69d970f974ff
comparison
equal deleted inserted replaced
3991:cd0943ceb326 3992:1c84268752a1
940 ap_url = parse.urljoin( 940 ap_url = parse.urljoin(
941 f"https://{self.apg.public_url}", 941 f"https://{self.apg.public_url}",
942 path 942 path
943 ) 943 )
944 request_type, extra_args = self.apg.parseAPURL(ap_url) 944 request_type, extra_args = self.apg.parseAPURL(ap_url)
945 if ((MEDIA_TYPE_AP in (request.getHeader("accept") or "") 945 if ((MEDIA_TYPE_AP not in (request.getHeader("accept") or "")
946 and request_type in self.apg.html_redirect)): 946 and request_type in self.apg.html_redirect)):
947 # this is not a AP request, and we have a redirections for it 947 # this is not a AP request, and we have a redirections for it
948 kw = {} 948 kw = {}
949 if extra_args: 949 if extra_args:
950 kw["jid"], kw["node"] = await self.apg.getJIDAndNode(extra_args[0]) 950 kw["jid"], kw["node"] = await self.apg.getJIDAndNode(extra_args[0])