Pattern expression with Ampersand

I have a request parameter that I'm attempting to parse using an ExtractVariables policy.

The parameter is provided as a query parameter, but the value contains a string of key/value pairs separated using the '&' character (as if they were query parameters themselves)

For example, the query string appears as follows:
responseData=Item1=value1&Item2=value2

 My ExtractVariable policy includes the following:

<Variable name="request.queryParam.responseData">
  <Pattern ignoreCase="true">Item1={item_1_value}&amp;Item2={item_2_value}</Pattern>
</Variable>

The value for request.queryParam.responseData is "Item1=value1&Item2=value2" and is confirmed in my proxy trace.

The parameter matching does not seem to respect the '&amp;' entity in the pattern validation. I've also attempted to use the HTML encoded value for ampersand "%26" instead of the XML entity but neither option seems to support the match I'm trying to achieve.

Any suggestions how else I might to resolve my predicament?

1 0 139
0 REPLIES 0