Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Nikki cfc23bc6fb servo: Merge #9391 - Test redirect_count boundaries in Fetch (from nikkisquared:test_redirect); r=jdm
I've written two new tests for Fetch: one to test the highest possible number of redirects succeeds; and another to ensure a failure in Fetch by requesting too many redirects. I also wrote a helper function to be used by each test, since the main difference is how many times they try to redirect.

I've also changed the check against redirect_count in http_network fetch to compare it as greater than or equal to 20, as opposed to being only equal to 20. That's outside of the spec, but in my experience testing for pure equality can easily create errors. Even though it's technically not possible for redirect_count be above 20, bizarre bugs during runtime certainly happen.

Source-Repo: https://github.com/servo/servo
Source-Revision: c80fa3386459efd27b64c8b6cab33794e66d082b
2016-01-21 02:07:38 +05:01
servo servo: Merge #9391 - Test redirect_count boundaries in Fetch (from nikkisquared:test_redirect); r=jdm 2016-01-21 02:07:38 +05:01