Skip to content
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

Support redirection #12

Merged
merged 2 commits into from
Sep 21, 2015
Merged

Support redirection #12

merged 2 commits into from
Sep 21, 2015

Conversation

ongakuer
Copy link

Fix bug #11

@danikula
Copy link
Owner

@ongakuer please add unit test for this case. For example generate short link on video link and test redirection. Please add test for exceeding redirects count.

@ongakuer
Copy link
Author

Sorry , I can`t make a redirect loop with short link…

@danikula
Copy link
Owner

But you can make short link on short link

@ongakuer
Copy link
Author

Yes,I've tried. But short link server can analyze the redirect url , and just shorter the final link…

@danikula
Copy link
Owner

Use bit.ly and ow.ly and make short link on each other. They doesn't recognize each other.

@ongakuer
Copy link
Author

I think something wrong with short url or HttpURLConnection. For the first time the short url response code was 301, and next time response code was 200

@danikula danikula merged commit 8263814 into danikula:master Sep 21, 2015
@danikula
Copy link
Owner

@ongakuer I merged your PR to master. Thanks for your contribution to project.

I think something wrong with short url or HttpURLConnection. For the first time the short url response code was 301, and next time response code was 200

It is not bug HttpURLConnection uses cache. See my comment.

@ltpquang
Copy link

@ongakuer why didn't you handle the code 307 Temporary Redirect? Is there any specific reason or you just simply missed it? My app is broken because the server side changes the redirecting code from 302 to 307

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.

3 participants