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.74k stars 782 forks source link

Fix acl_remap bug #11414

Closed mattyw closed 3 weeks ago

mattyw commented 4 weeks ago

The acl remap rules are described in [1]. Namely:

  1. A remap.config ACL line for an individual remap rule.
  2. All named ACLs in remap.config.
  3. Rules as specified in ip_allow.yaml.

This commit fixes a bug that would cause (2) to not be processed if there was no entry in (1).

[1] src/proxy/http/remap/RemapConfig.cc:123

mattyw commented 3 weeks ago

@bneradt I think I've made all the changes you requested. The only different I made to your suggestion was to use DELETE instead of PUSH as the PUSH will typically return a 400 in these tests. In the interests of changing as little as possible I thought I'd use DELETE - I believe it tests the same thing

bneradt commented 3 weeks ago

@bneradt I think I've made all the changes you requested. The only different I made to your suggestion was to use DELETE instead of PUSH as the PUSH will typically return a 400 in these tests. In the interests of changing as little as possible I thought I'd use DELETE - I believe it tests the same thing

Looks good. DELETE should be fine. Once you resolve the open rewording tweaks, we should be good to go.

Thank you again for the fix.

cmcfarlen commented 3 weeks ago

Cherry-picked to v10.0.x