changeset 3991:cd0943ceb326

component AP gateway: fix header checking for redirection
author Goffi <goffi@goffi.org>
date Fri, 25 Nov 2022 16:14:10 +0100
parents 3b72743b92db
children 1c84268752a1
files sat/plugins/plugin_comp_ap_gateway/http_server.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_ap_gateway/http_server.py	Thu Nov 24 12:25:07 2022 +0100
+++ b/sat/plugins/plugin_comp_ap_gateway/http_server.py	Fri Nov 25 16:14:10 2022 +0100
@@ -942,7 +942,7 @@
             path
         )
         request_type, extra_args = self.apg.parseAPURL(ap_url)
-        if ((request.getHeader("accept") != MEDIA_TYPE_AP
+        if ((MEDIA_TYPE_AP in (request.getHeader("accept") or "")
              and request_type in self.apg.html_redirect)):
             # this is not a AP request, and we have a redirections for it
             kw = {}