Skip to content

Commit 0a9c002

Browse files
authored
Merge pull request #177 from DMTF/Fix172-Workaround-For-Location-Header
Added workaround and warnings for session login when the service incorrectly does not provide the session location in the 'Location' response header
2 parents 31d2aaa + befff77 commit 0a9c002

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/redfish/rest/v1.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ def session_location(self):
290290
return self._session_location
291291

292292
self._session_location = self.getheader('location')
293+
if self._session_location is None:
294+
warnings.warn("Service incorrectly did not provide the 'Location' response header when creating a session; attempting to "
295+
"get the session location from the response body. Contact your vendor.")
296+
self._session_location = self.dict["@odata.id"]
293297
return self._session_location
294298

295299
@property

0 commit comments

Comments
 (0)