brbzull0 opened a new issue #7800: URL: https://github.com/apache/trafficserver/issues/7800
While looking at https://github.com/apache/trafficserver/issues/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](https://github.com/apache/trafficserver/files/6452195/stream.all.txt) 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](https://github.com/apache/trafficserver/commit/256ea08aee75429e9198038f86c4757a97271cb5) on my local branch, _this commit correspond to WIP test_ _Using latest from master branch._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
