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

Fixes #67 - Follow HTTP redirects. #117

Merged
merged 1 commit into from
Jun 26, 2014
Merged

Fixes #67 - Follow HTTP redirects. #117

merged 1 commit into from
Jun 26, 2014

Conversation

mikeantonelli
Copy link

Follow HTTP redirects.
Add tests.
Fix deprecation warnings (be_true and be_false).

Fix deprecation warnings (be_true and be_false).
@tjarratt
Copy link
Contributor

Thanks for fixing the deprecation warnings. I hadn't seen those, so it's nice that you fixed those up.

This looks eminently reasonable. The only change I'd like to make is to log the redirect URL, but I'm cool adding that later.

tjarratt added a commit that referenced this pull request Jun 26, 2014
@tjarratt tjarratt merged commit be1ed7e into savonrb:master Jun 26, 2014
adapter_class.request(method)
response = adapter_class.request(method)

if response and response.code == 302 and request.follow_redirect?
Copy link
Member

Choose a reason for hiding this comment

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

Here we should check for [301, 302, 303, 307, 308]. https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection

Agree @tjarratt and @mikeantonelli?

Copy link
Contributor

Choose a reason for hiding this comment

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

Completely agree.

@mikeantonelli
Copy link
Author

@tjarratt @rogerleite I opened #121 to add the full range of redirect response codes and log the redirect location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants