SoapStubAdapter does not handle Set-Cookie header properly
@tianhao64 is already working on this.
Since Dec 29, 2015.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
From a field report:
if [an] extension tries to generate its own cookie via:
Set-Cookie: you_are_doomed="Now"then client library forgets vmware_soap_session cookie, and starts sending 'you_are_doomed="Now"' cookie instead (correct behavior is to start sending both of them), instantly invalidating your session:
Salient code is: SoapAdapter.py#L1213
cookie = resp.getheader('set-cookie')
status = resp.status
if cookie:
self.cookie = cookie
Where self is an instance of the class SoapStubAdapter which holds a copy of the SOAP session cookie inside itself. The correct behavior is to follow standard HTTP client session conventions and maintain whatever cookies the server sets for the session. To do otherwise invites the strange and spurious bugs at a possible later date.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.