While looking at #2742 I found that the proxy.config.http.number_of_redirections seems not to be working as expected.
In my configuration I set this config variable to 1 expecting TS to just follow the 302 once, but in my scenario where I have 2 302 being returned by different origin server I can see that TS follows it twice.
Sequence:
1 - client -> ATS GET foo.test/
2 - ATS -> origin GET /
3 - origin -> ATS 302 bar.test/ ( ATS will follow )
4 - ATS -> GET bar.test/ (1 redirect)
5 - origin -> ATS 302 kau.test/ (again another 302, but as number_of_redirections was set to 1, then no more redirects should happen, but...)
6 - ATS -> kau.test/
...
in #6 ATS is following the 302 when it should not as proxy.config.http.number_of_redirections was set to 1.
Please check the logs for more detail: TS-LOG
After a quick look at the code, it seems that we may be comparing the counting wrongly in several places.
If more details on the scenario is needed, please check this commit on my local branch, this commit correspond to WIP test
Using latest from master branch.
While looking at #2742 I found that the
proxy.config.http.number_of_redirectionsseems not to be working as expected.In my configuration I set this config variable to
1expecting TS to just follow the 302 once, but in my scenario where I have 2302being returned by different origin server I can see that TS follows it twice.Sequence:
in
#6ATS is following the 302 when it should not asproxy.config.http.number_of_redirectionswas set to 1.Please check the logs for more detail: TS-LOG
After a quick look at the code, it seems that we may be comparing the counting wrongly in several places.
If more details on the scenario is needed, please check this commit on my local branch, this commit correspond to WIP test
Using latest from master branch.