Skip to content

Stop redirect loops #1

@asf-stripe

Description

@asf-stripe

It's possible for a misconfigured HTTP server to redirect /a to /b and /b back to /a. Most HTTP clients stop following redirects after a few. We've arbitrarily chosen 20 in the failing test at 0f292f4.

You can run only this test with

mvn test -Dsurefire.useFile=false '-Dtest=CallTest#doesNotFollow21Redirects' -DfailIfNoTests=false

Make sure the follow20Redirects test continues to pass.

IntelliJ IDEA tips:
Make sure you run mvn generate-sources before opening in IDEA.
If you're reading this too late, right-click the okhttp project > Maven > Generate Sources and Update Folders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions