Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

make createConnection overridable by sub classes #6

Merged
merged 1 commit into from
Dec 11, 2013
Merged

make createConnection overridable by sub classes #6

merged 1 commit into from
Dec 11, 2013

Conversation

stephanos
Copy link
Contributor

We're working on an Authy integration and would like to get the client running on App Engine. Currently we get this exception:

java.lang.ClassCastException: com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection cannot be cast to javax.net.ssl.HttpsURLConnection
    at com.authy.api.Resource.createConnection(Unknown Source)
    at com.authy.api.Resource.request(Unknown Source)
    at com.authy.api.Resource.post(Unknown Source)
    at com.authy.api.Users.createUser(Unknown Source)

App Engine supports HttpURLConnection, but not HttpsURLConnection.
So we need to be able to easily override this behaviour, hence this change.

Please merge and create a new Jar.

@danpal
Copy link
Contributor

danpal commented Dec 11, 2013

We're happy to review and make the change. However I am a little concerned that Https connection cannot be used.
What are you guys planning to use? We currently support HTTP, but its likely due to recent revelations (snowden) that we kill http entirely on 2014.

@stephanos
Copy link
Contributor Author

Thanks for the quick reply.

It's an App Engine thing ... the App Engine SDK just uses the interface of HttpURLConnection, but uses its own implementation (which supports HTTPS) in the background. Weird, I know!

So be assured, we wouldn't try to add another level of security with Authy just to screw it up by not using HTTPS :)

@danpal
Copy link
Contributor

danpal commented Dec 11, 2013

Great then, I'll merge and close.

danpal pushed a commit that referenced this pull request Dec 11, 2013
make createConnection a protect method instead of private so it's overridable. (AppEngine).
@danpal danpal merged commit 4453b26 into twilio:master Dec 11, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants