Improved the handling of cookies.#172
Conversation
| except RTCException: | ||
| raise RTCException("Relogin Failed: " | ||
| "Invalid username or password") | ||
| kwargs["headers"]["Cookie"] = rtc_obj.headers["Cookie"] |
There was a problem hiding this comment.
Here should be kwargs["cookies"] = rtc_obj.cookies
There was a problem hiding this comment.
Thank you for your review. I've modified the source code.
| raise exception.RTCException("Authentication Failed: " | ||
| "Invalid username or password") | ||
|
|
||
| _cookies = None |
There was a problem hiding this comment.
L97 _headers = {"Content-Type": self.CONTENT_XML} is useless for now.
There was a problem hiding this comment.
Thank you for your review. I've modified the source code.
|
Please wait to merge. I may have found a bug in this code. |
|
Sorry. There was a problem with how to set the cookie when not redirecting, so I fixed it. |
|
@ojima-ryou Please feel free to ping when this PR is ready. Thanks. cc @gpongelli for the cookie handling part, this could be useful for backward compatibility. |
Sure. Before the final review, I suggest to rebase this PR . |
Hello. I've improved rtcclient's use of cookies. Before the improvement, communication with the RTC server was performed while the unnecessary character string was set in the cookie of the HTTP-Header. I think this implementation is more secure. I hope you like it.