Skip to content

Commit

Permalink
fixup! CP-50537: Propagate originator as a http request header
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBuica committed Oct 28, 2024
1 parent e303799 commit a4648e2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions python3/examples/XenAPI/XenAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,12 @@ def with_tracecontext(self):
# pylint: disable=possibly-used-before-assignment
propagators = propagate.get_global_textmap()
propagators.inject(headers, ctx)

self._extra_headers = []
for k, v in headers.items():
self.add_extra_header(k, v)
def make_connection(self, host):
self._extra_headers = []
self.with_tracecontext()

originator_k = "ORIGINATOR"
originator_v = os.getenv(originator_k, None)
if originator_v:
self.add_extra_header(originator_k.lower(), originator_v)

# compatibility with parent xmlrpclib.Transport HTTP/1.1 support
if self._connection and host == self._connection[0]:
return self._connection[1]
Expand Down

0 comments on commit a4648e2

Please sign in to comment.