Skip to content

Commit

Permalink
treq.client.HTTPClient impacted after upgrading to 22.1.0: http agent…
Browse files Browse the repository at this point in the history
… parameter should now be set inside the headers.
  • Loading branch information
farirat committed Feb 22, 2022
1 parent 7698b32 commit d700626
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jasmin/routing/throwers.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ def http_deliver_sm_callback(self, message):
params=params,
data=postdata,
timeout=self.config.timeout,
agent='Jasmin gateway/1.0 deliverSmHttpThrower',
headers={'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'text/plain'})
'Accept': 'text/plain',
'User-Agent': 'Jasmin gateway/1.0 deliverSmHttpThrower'})
self.log.info('Throwed message [msgid:%s] to connector (%s %s/%s)[cid:%s] using http to %s.',
msgid, route_type, counter, len(dcs), dc.cid, dc.baseurl)

Expand Down Expand Up @@ -564,9 +564,9 @@ def http_dlr_callback(self, message):
params=params,
data=postdata,
timeout=self.config.timeout,
agent='Jasmin gateway/1.0 %s' % self.name,
headers={'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'text/plain'})
'Accept': 'text/plain',
'User-Agent': 'Jasmin gateway/1.0 %s' % self.name})
self.log.info('Throwed DLR [msgid:%s] to %s.', msgid, baseurl)

content = yield text_content(response)
Expand Down

0 comments on commit d700626

Please sign in to comment.