Skip to content

Commit befff77

Browse files
committed
Added workaround and warnings for session login when the service incorrectly does not provide the session location in the 'Location' response header
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
1 parent dad6b2a commit befff77

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)