apache / trafficserver

Apache Traffic Serverâ„¢ is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
https://trafficserver.apache.org/
Apache License 2.0
1.8k stars 798 forks source link

Dubiously correct code in header_rewrite plugin. #11496

Closed ywkaras closed 1 month ago

ywkaras commented 3 months ago

This seems like it would cause a duplicate call to TSHttpTxnReenable() (since it's call in an operator exec() function). https://github.com/apache/trafficserver/blob/e31eca4565db721c8f2032d5baa161affeb7073a/plugins/header_rewrite/operators.cc#L537

This continuation function runs on transaction hooks, but it does not call TSHttpTxnReenable(): https://github.com/apache/trafficserver/blob/e31eca4565db721c8f2032d5baa161affeb7073a/plugins/header_rewrite/operators.cc#L434

ywkaras commented 3 months ago

This is the pull request that introduced the code in question: https://github.com/apache/trafficserver/pull/2495