IBM Support

Caching Proxy: Using of MapQuery directive

Troubleshooting


Problem

When the Caching Proxy performs rule mapping, it simplifies the incoming requests with queries. The incoming requests are parsed without using the string after a question mark causing Caching Proxy to be unable to differentiate from unique incoming queries.

Cause

The Caching Proxy could not handle URL with query string before the MapQuery directive was added.

Resolving The Problem

Before the MapQuery directive was added, when the Proxy performed rule mapping, it always simplified the incoming request to a request path without the question mark. The Proxy also used the request path to match the mapping rules defined in the ibmproxy.conf.

In order to handle a URL with a query string, the MapQuery directive was provided. The functionality of the directive is almost the same as the Map rule, except it uses the whole incoming request (including the path and query string) URL to match the rule. If the incoming URL is matched on a MapQuery rule, the translated URL is used to match against the rest of the rules.

The following is an example. Assume the incoming URL is:
/getsomthing?type=1

Rules are the following:
MapQuery  /getsomething?type=*  /gettype/*
Note: The text /gettype/1 is the translated URL and is used in the next rule mapping.

The next mapping rule:
Proxy  /gettype/*  http://server/gettype/*
Note: The translated URL is now http://server/gettype/1.

MapQuery could also translate a URL with a query string to another URL with a different path or different query string. However, because all other mapping directives use request path, the changed query string is appended to the translated URL when the request path is matched.

Usage can be found in the Caching Proxy Administration Guide in the Edge Information Center

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Edge Component","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.5;8.0;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
12 June 2020

UID

swg21210794