Describe the bugpath and match_pattern does not behave the same causing problems on url_rewrites, method_transforms and transform_headers in extended_paths
Reproduction steps
Bellow is an API configuration that helps to reproduce the steps.
Load the API
Create a GET request on http://127.0.0.1:8080/base/v1/resource/abcd12345
The request is proxied correctly to the target_url, but the method_transforms and transform_headers rules are applied to it, even if the regular expresion is not matching (it seems the the lenght param in the regex is ignored). The regex (?:[0-9a-fA-F]{8})$ is treated like (?:[0-9a-fA-F]([^/]*))$
Actual behavior
GET http://127.0.0.1:8080/base/v1/resource/abcd12345
x-remove-header: remove-value
x-test-header: test-value
@anx-hnezbeda Thanks for contacting Tyk!
We apologize for the delayed response. The issue is currently being reviewed and we will keep you updated as soon as we can
Branch/Environment/Version
Describe the bug
path
andmatch_pattern
does not behave the same causing problems onurl_rewrites
,method_transforms
andtransform_headers
inextended_paths
Reproduction steps Bellow is an API configuration that helps to reproduce the steps.
http://127.0.0.1:8080/base/v1/resource/abcd12345
method_transforms
andtransform_headers
rules are applied to it, even if the regular expresion is not matching (it seems the the lenght param in the regex is ignored). The regex(?:[0-9a-fA-F]{8})$
is treated like(?:[0-9a-fA-F]([^/]*))$
Actual behavior
The above request has the following results:
x-remove-header
is removedx-add-header
is addedExpected behavior
The above request should have the following results:
x-remove-header
is not removedx-add-header
is not addedWorking examples
Case that mathes regex
The above request has the following results:
x-remove-header
is removedx-add-header
is addedCase that does not math regex (by content, not by length)
The above request has the following results:
x-remove-header
is not removedx-add-header
is not addedConfiguration (tyk api config file):