moonchen opened a new issue, #13800: URL: https://github.com/apache/trafficserver/issues/13800
In a remap rule, `rm-destination` crashes `traffic_server` if `set-destination URL` ran earlier for the same request. The two operators don't have to be in the same rule. For example, a conditional `set-destination URL` that routes canary traffic, plus a separate rule that strips a tracking parameter from every request: `remap.config`: ``` map http://www.example.com/ http://127.0.0.1:8081/ @plugin=header_rewrite.so @pparam=rules.conf ``` `rules.conf`: ``` cond %{CLIENT-HEADER:X-Canary} ="1" set-destination URL "http://127.0.0.1:8081/canary/?%{CLIENT-URL:QUERY}" cond %{TRUE} rm-destination QUERY "utm_source" ``` Requests without `X-Canary` are proxied normally. This one crashes `traffic_server`: ``` curl -x http://127.0.0.1:8080 -H 'X-Canary: 1' 'http://www.example.com/?utm_source=x&a=1' ``` ``` Fatal: src/api/InkAPI.cc:1077: failed assertion `sdk_sanity_check_url_handle(obj) == TS_SUCCESS` ``` `set-destination URL` replaces the request's URL object with `TSHttpHdrUrlSet()`. `rm-destination` still uses `_rri->requestUrl`, which points at the old, deallocated object. #12278 fixed the same problem for `set-destination` by checking `res.changed_url` and re-reading the URL from the header; `rm-destination` needs the same check. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
