-
Notifications
You must be signed in to change notification settings - Fork 119
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
client.start_archive does not send auth credentials #60
Comments
while i could fix this in our project, i'm wondering if this is an issue upstream in one of the libraries we use like httparty in your environment (e.g. windows). the expected functionality of the code as is should be that the headers are merged, not overwritten. in fact, we've tested for this in the specs when we match against this cassette. can you give us a little more detail about your environment (version of the OS, version of Ruby, versions of any other relevant packages)? i'm happy to fix this here but if we can help improve the upstream libraries too that would be a win for everyone. |
@aoberoi, your hunch was right. This is a bug in httparty that was reported here: jnunemaker/httparty#255 and fixed in version 0.13.1 (I was on 0.12.0). Maybe the dependency in the opentok gemspec just needs to be updated to require at least this new version of httparty. |
Fixes opentok#60 because it includes fix for jnunemaker/httparty#255
client.rb:34 overrides the headers to pass in the content-type. This causes only the content type to be included in the call, and the instance X-TB-PARTNER-AUTH and User-Agent headers are not included. This causes an authentication error to be returned. Changing line 34 as below fixes the issue.
:headers => self.class.headers.merge({"Content-Type" => "application/json" })
The text was updated successfully, but these errors were encountered: