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

Correctly analyze the response of manual registrations #2

Merged
merged 1 commit into from
Jun 14, 2017
Merged

Correctly analyze the response of manual registrations #2

merged 1 commit into from
Jun 14, 2017

Conversation

rossabaker
Copy link
Member

The endpoint redirects, and the client follows the redirect. We should be
looking for a 2xx response, not a 3xx response.

In some vendor upgrade somewhere, we lost the propagation of the session cookie.
Set the redirect policy so we send it if we're redirecting to the same host.

The endpoint redirects, and the client follows the redirect. We should be
looking for a 2xx response, not a 3xx response.

In some vendor upgrade somewhere, we lost the propagation of the session cookie.
Set the redirect policy so we send it if we're redirecting to the same host.
SetDebug(globalEnableDebug)
SetDebug(globalEnableDebug).
RedirectPolicy(func(req gorequest.Request, via []gorequest.Request) error {
// Copy the Cookie on redirect if the hosts match
Copy link
Member Author

Choose a reason for hiding this comment

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

My understanding is that net/http client (line 633) should handle this, but it's not.

We're being sloppy about case insensitivity of hosts and the HTTP spec, but I think this is enough to make the feature work without compromising the Nelson API or accidentally spewing credentials in case Nelson starts redirecting somewhere else.

@timperrett timperrett merged commit 0ffce04 into getnelson:master Jun 14, 2017
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.

2 participants