You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Endpoint._make_request (in tableauserverclient/server/endpoint/endpoint.py) parses the response Content-Type and calls the namespace-detection helper only when it matches:
Tableau Server emits text/xml (which is what TSC's own XML_CONTENT_TYPE constant is set to), so _namespace.detect() never fires from this path. The pre-existing sign-in path called _namespace.detect() explicitly, so the pre-8.3 namespace fallback still worked there; PR #1848 routes signin through _make_request, which now exposes the bug for signin traffic too.
Two things worth thinking about together:
The immediate fix: widen the guard to accept both application/xml and text/xml, or (cheaper) just check "xml" in content_type since detection is idempotent and cheap.
Is the code even reachable? The namespace fallback exists to accept pre-Tableau-8.3 servers that used http://tableausoftware.com/api instead of http://tableau.com/api. TSC's minimum_supported_server_version is 2.3, which corresponds to Tableau Server 10.0 (2016). Any server old enough to emit the pre-8.3 namespace is far below the minimum. See Stop supporting old namespaces #1046 and PR Remove pre-8.3 XML namespace fallback #1863 for a proposed removal of the whole detection subsystem.
If PR #1863 lands, this issue is moot (the whole _namespace.detect call and the Namespace class go away). If it doesn't, we need to fix the guard.
Filed after a fresh-eyes review flagged the guard on PR #1848.
Endpoint._make_request(intableauserverclient/server/endpoint/endpoint.py) parses the response Content-Type and calls the namespace-detection helper only when it matches:Tableau Server emits
text/xml(which is what TSC's ownXML_CONTENT_TYPEconstant is set to), so_namespace.detect()never fires from this path. The pre-existing sign-in path called_namespace.detect()explicitly, so the pre-8.3 namespace fallback still worked there; PR #1848 routes signin through_make_request, which now exposes the bug for signin traffic too.Two things worth thinking about together:
application/xmlandtext/xml, or (cheaper) just check"xml" in content_typesince detection is idempotent and cheap.http://tableausoftware.com/apiinstead ofhttp://tableau.com/api. TSC'sminimum_supported_server_versionis 2.3, which corresponds to Tableau Server 10.0 (2016). Any server old enough to emit the pre-8.3 namespace is far below the minimum. See Stop supporting old namespaces #1046 and PR Remove pre-8.3 XML namespace fallback #1863 for a proposed removal of the whole detection subsystem.If PR #1863 lands, this issue is moot (the whole
_namespace.detectcall and theNamespaceclass go away). If it doesn't, we need to fix the guard.Filed after a fresh-eyes review flagged the guard on PR #1848.