-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Dio not properly following redirects and returning incorrect response bodies #793
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
This is not stale, the issue remains and is unresolved. Thank you. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
Again, the issue is unresolved. Thank you. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
Any progress on this issue? |
Does it not support redirect? |
New Issue Checklist
Issue Info
Issue Description and Steps
I am using Dio in a Flutter app and as part of testing, I was using the examples at https://the-internet.herokuapp.com/
I've noticed that whether or not I use the correct credentials to log into https://the-internet.herokuapp.com/login, the Dio response data is the same. It doesn't appear to see the login results message, nor does it go to the "secure" page upon a successful login.
Postman returns the correct HTML response, you can also view it correctly in Chrome DevTools or simple View Source. However Dio is unable to get the correct response (the Dart http package also returns incorrect response bodies).
The POST to "authenticate" returns a 303 redirect to either the "login" page again or to a "secure" page if successful. Dio only goes back to the login page (even with correct credentials) and does not include the "invalid credentials" message from the page source. The site does not use AJAX or require an additional HTTP call to get the login status, so that's not the issue.
My full test is:
Thanks very much!
The text was updated successfully, but these errors were encountered: