Skip to content

Fix empty connection data parameter #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 3, 2017
Merged

Conversation

maikthomas
Copy link
Contributor

@maikthomas maikthomas commented Mar 23, 2017

Generate token: I have made it so that the connection_data parameter of a token is not sent if empty (None, "" or whatever). This is in keeping with the behaviour of the other opentok SDKs.

This also avoids a bug where connection_data of value None is converted to string "None". https://github.com/kennethreitz/requests/issues/378

I have also simplified the check for empty data to if data:

@eauge
Copy link
Contributor

eauge commented Mar 23, 2017

Thanks @maikthomas for this PR. Could you please add a unit test for it to prevent regressions?

@maikthomas
Copy link
Contributor Author

@marcioaffonso I've add the fix and a unit test to check it.
The test are failing on python 3.2 due to incompatability with urllib3/requests. But this is already solved in #105 so once that is merged there should be no issue

@maikthomas
Copy link
Contributor Author

@marcioaffonso all tests now pass, thanks to @aiham 👍

Copy link

@marcioaffonso marcioaffonso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maikthomas maikthomas merged commit c38162e into opentok:master Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants