KB Article #182275

ICAP filter reports java.lang.RuntimeException: Method '<method>' not supported!

Problem

The ICAP filter fails with one of the following error messages:


java.lang.RuntimeException: Method 'REQMOD' not supported!
java.lang.RuntimeException: Method 'RESPMOD' not supported!


Additionally, the filter only performs an OPTIONS request to the ICAP server and never sends the requested RESPMOD or REQMOD request.


Resolution

When the API Gateway communicates with an ICAP server, it first runs an OPTIONS request to see what methods the server supports. The server will then reply with ICAP headers, including a Methods header showing which methods it supports that looks something like this:


   ICAP/1.0 200 OK
   Date: Mon, 10 Jan 2000  09:55:21 GMT
   Methods: RESPMOD
   Service: FOO Tech Server 1.0
   ISTag: "W3E4R7U9-L2E4-2"


In this example, the server only supports RESPMOD, so if you had configured the ICAP filter to send a REQMOD request to the ICAP server, it would fail with the error java.lang.RuntimeException: Method 'REQMOD' not supported! This error happens because the server has informed us that it will not support the method selected in the ICAP filter, so the API Gateway does not even attempt to send the unsupported method to the server. To fix this, you will have to use only methods supported by your ICAP server in the ICAP filter. For more information about ICAP, see RFC 3507.