Skip to content

Handle redirects #630

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

Closed
Jawnnypoo opened this issue Apr 12, 2017 · 9 comments
Closed

Handle redirects #630

Jawnnypoo opened this issue Apr 12, 2017 · 9 comments

Comments

@Jawnnypoo
Copy link
Member

Right now, within ParseHttpClient, line 68, we are modifying the OkHttp client builder to not allow for redirects. Do we have any idea why this is the case? There is a comment that links to https://quip.com/Px8jAxnaun2r which I cannot access and see what the reasoning is.

@flovilmart Are you by chance able to see this document and see why this is important. Seems like some server configurations might want to be able to follow redirects and this seems like an unneeded restriction now that this library is not just for Parse.com

@Jawnnypoo
Copy link
Member Author

@rogerhu
Copy link
Contributor

rogerhu commented Apr 12, 2017

@wangmengyan95 ^^

@Jawnnypoo
Copy link
Member Author

If we are getting no answer here, I think it would be best to remove this. I can think of no reasons why we would not allow redirects (it was probably something with parse.com and not parse server). Maybe we can have someone look into the iOS SDK and see if they are not allowing redirects?

@flovilmart
Copy link
Contributor

The save object has a redirect

@Jawnnypoo
Copy link
Member Author

@flovilmart Meaning redirects should not be allowed? I am envisioning that someone might have something like myapp.com which is hosted on Heroku, so its being directed to myapp.heroku.com and right now, the Android app would not allow for this as far as I can tell since we are not allowing redirects.

@flovilmart
Copy link
Contributor

I don't believe it's good practices to have redirect, not sure if it would break to follow them. How is the iOS behaving?

@Jawnnypoo
Copy link
Member Author

I am not familiar with the iOS SDK, but I imagine it does support redirects unless it is specifically disabling them like we are?

@rogerhu
Copy link
Contributor

rogerhu commented Apr 20, 2017

// Don't handle redirects. We copy the setting from AndroidHttpClient.

I suspect is was to make things consistent with AndroidHttpClient, which does not follow 302 links automatically.

http://blog.kosev.net/2011/01/follow-302-redirects-with-androidhttpclient/

I agree, I think we can take this thing out.

@rogerhu
Copy link
Contributor

rogerhu commented Apr 20, 2017

small hygiene but you can put your full name in the commit log? :)

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

No branches or pull requests

3 participants