Apigee URL encoding question

Hello,

I have browsing some related topics, but couldn't find yet answer.

Maybe you can help me. I have one issue with URL encoding. Request seemed to be modified in Apigee, but I don't know how to prevent it or change it back before forwarding to backend.

This is sent by client:
/test/login1.do?ts=EE&act=id&ajax=true&cs=something

This is what I see in Apigee trace UI:
/test/login1.do?ts=EE&%3Bact=id&%3Bajax=true&%3Bcs=something

So, semicolon ";" is replaced by %3B. Is there any way to stop doing it in Apigee? Or at least change it back before request goes to backend? Assuming we can't do any changes in backend.

Apigee is acting as a proxy between client and a webpage.

Appreciate any advice!

Solved Solved
0 2 1,201
1 ACCEPTED SOLUTION

Thank you, Denis!

Actually problem is solved now.

Did such way:

1) In target preflow using JS policy I saved querystring into variable.

2) Then in AssignMessage I removed all query parameters.

3) Then in another JS policy I took pre-saved querystring, extracted all parameters, did url-decoding and added new "clean" query parameters.

For me such solution worked.

View solution in original post

2 REPLIES 2

I'm pretty positive it's impossible, I tried to override this, on Target PreFlow:

var replace = context.getVariable("request.queryparam.abc").replace("%3B",";")


context.setVariable("request.queryparam.abc", replace);
print(replace);

But server sends it anyway like designed, it is HTTP stack rules

Thank you, Denis!

Actually problem is solved now.

Did such way:

1) In target preflow using JS policy I saved querystring into variable.

2) Then in AssignMessage I removed all query parameters.

3) Then in another JS policy I took pre-saved querystring, extracted all parameters, did url-decoding and added new "clean" query parameters.

For me such solution worked.