mirror of
https://opendev.org/x/pyghmi
synced 2025-03-19 18:07:45 +00:00
Workaround IMM header problems
When using IPv6 to IMMv2, the web will reject the fe80:: Set fake 1.2.3.4 headers to always give a pleasant and consistent result to the IMM. Change-Id: I56e738841269f24fe1968f77d7a3aa492f6bee23
This commit is contained in:
parent
ae09f17332
commit
a976525a53
@ -354,8 +354,9 @@ class IMMClient(object):
|
||||
'password': self.password,
|
||||
'SessionTimeout': 60})
|
||||
headers = {'Connection': 'keep-alive',
|
||||
'Referer': 'https://{0}/designs/imm/index.php'.format(
|
||||
self.imm),
|
||||
'Origin': 'https://1.2.3.4/',
|
||||
'Host': '1.2.3.4',
|
||||
'Referer': 'https://1.2.3.4/designs/imm/index.php',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'}
|
||||
wc.request('POST', '/data/login', adata, headers)
|
||||
rsp = wc.getresponse()
|
||||
|
Loading…
x
Reference in New Issue
Block a user