Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping rules: Avoid issues with double slash. #1159

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

eloycoto
Copy link
Contributor

Due to the work make in APIAP, the double slash can happen quite easily,
as described in THREESCALE-3950. With this commit, when a new
mapping_rule is defined, double slash will be simplified to one to be
able to match with ngx.var.uri.

FIX THREESCALE-3950

Signed-off-by: Eloy Coto eloy.coto@gmail.com

@eloycoto eloycoto requested a review from a team as a code owner January 20, 2020 12:26
Due to the work make in APIAP, the double slash can happen quite easily,
as described in THREESCALE-3950. With this commit, when a new
mapping_rule is defined, double slash will be simplified to one to be
able to match with ngx.var.uri.

FIX THREESCALE-3950

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
@@ -90,6 +91,13 @@ end
function _M:rewrite(context)
local soap_action_uri = extract_soap_uri()

-- If the soap_action_uri is a complete url, the mapping rule is only the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing something. How is this change in the SOAP policy related to the original issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action in the content-type can be a full url, so we need to pass it correctly:

it('calculates the usage and merges it with the one in the context', function()
ngx.req.get_headers = function()
return { ["Content-Type"] = 'application/soap+xml;action=' .. full_url }
end

@eloycoto eloycoto merged commit f819ddb into 3scale:master Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants