Title
Create new category
Edit page index title
Edit category
Edit link
How an ICAP Request looks like?

ICAP requests (defined in RFC 3507) are HTTP-like messages used to send content to the ICAP Server for processing.
Basic format:
xxxxxxxxxx<ICAP Method> <ICAP URI> ICAP/1.0ICAP-Headers Encapsulated-HTTP-MessageEXAMPLE: REQMOD Request:
xxxxxxxxxxREQMOD icap://icap.example.net/reqmod ICAP/1.0Host: icap.example.netEncapsulated: req-hdr=0, null-body=0 GET / HTTP/1.1Host: example.comKey Elements:
Request line:
- Defines the method and service:
REQMOD- modify HTTP requestRESPMOD- modify HTTP responseOPTIONS- query capabilitiesFILEMOD- Transfer file data to ICAP server for processing
ICAP Headers
- Provide metadata (e.g.,
Host,User-Agent,Preview)
- Provide metadata (e.g.,
Encapsulated header (required)
- Specifies which HTTP parts are included and their offsets
- Example:
xxxxxxxxxxEncapsulated: req-hdr=0, req-body=137- Embedded HTTP message
- The actual HTTP request or response being processed
Invalid ICAP requests — such as those with malformed structure, unsupported methods, or missing mandatory headers — are rejected by the ICAP server and result in a 400 (Bad Request) response. Ensuring that requests follow the correct format, including a valid request line and properly defined Encapsulated header, is essential for successful processing.
OPTIONS
Sent by the client to discover what methods and capabilities the ICAP server supports.
Example request:
xxxxxxxxxxOPTIONS icap://<ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>/OMSScanResp-AV ICAP/1.0Host: <ICAP-CLIENT-IP>:<ICAP-SERVER-PORT>Allow: 206Example response:
xxxxxxxxxxICAP/1.0 200 OKMethods: REQMOD, RESPMOD, FILEMODService: MetaDefender ICAP ServerISTag: "<ISTAG-VALUE>"Max-Connections: 100Options-TTL: 3600Allow: 204Preview: 1024Transfer-Preview: *Encapsulated: null-body=0REQMOD
Used to intercept and scan or modify an outgoing HTTP request, such as a file upload.
Example request:
xxxxxxxxxxREQMOD icap://<ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>/virus_scan ICAP/1.0Host: <ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>Encapsulated: req-hdr=0, null-body=170 GET / HTTP/1.1Host: <ORIGIN-SERVER-HOST>Accept: text/html, text/plainAccept-Encoding: compressCookie: <SESSION-COOKIE>If-None-Match: "<ETAG-VALUE>"Example response:
xxxxxxxxxxICAP/1.0 200 OKISTag: "<ISTAG-VALUE>"Date: Tue, 16 Feb 2016 11:51:03 GMTService: MetaDefender ICAP ServerX-Violations-Found: 0Encapsulated: req-hdr=0, null-body=0 GET / HTTP/1.1Host: <ORIGIN-SERVER-HOST>Accept: text/html, text/plainAccept-Encoding: compressRESPMOD
Used to intercept and scan or modify an HTTP response being returned to the client, such as a file download.
Example request:
xxxxxxxxxxRESPMOD icap://<ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>/virus_scan ICAP/1.0Host: <ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>Date: Tue, 16 Feb 2016 11:51:03 GMTEncapsulated: req-hdr=0, res-hdr=618, res-body=831X-Client-IP: <CLIENT-IP> GET /eicar.dirty HTTP/1.1Host: <ORIGIN-SERVER-HOST>User-Agent: Mozilla/5.0Accept-Encoding: gzip, deflate, sdch HTTP/1.1 200 OKContent-Disposition: attachment; filename="eicar.dirty"Content-Length: 68Content-Type: application/octet-stream X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*Example response (threat detected):
xxxxxxxxxxICAP/1.0 403 ForbiddenISTag: "<ISTAG-VALUE>"Date: Tue, 16 Feb 2016 11:51:04 GMTService: MetaDefender ICAP ServerX-Violations-Found: 1 eicar.dirty EICAR Test String 11101 2Encapsulated: null-body=0FILEMOD
A non-standard extension that passes a local file path to the ICAP server for in-place scanning, without streaming the file over the network.
Example request:
xxxxxxxxxxFILEMOD icap://<ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>/ ICAP/1.0Host: <ICAP-SERVER-HOST>:<ICAP-SERVER-PORT>X-Filepath: <PATH-TO-FILE>Connection: closeEncapsulated: null-body=0Example response (threat detected):
xxxxxxxxxxICAP/1.0 403 Forbidden.ISTag: "<ISTAG-VALUE>"Date: Thu Nov 12 13:47:25 2020 GMTService: MetaDefender ICAP ServerService-ID: MetascanX-Violations-Found: 1 <FILENAME> <THREAT-NAME> <THREAT-ID> <SEVERITY>Encapsulated: null-body=0Example response (clean file):
xxxxxxxxxxICAP/1.0 204 No modifications neededISTag: "<ISTAG-VALUE>"Date: Thu Nov 12 13:47:25 2020 GMTService: MetaDefender ICAP ServerService-ID: MetascanEncapsulated: null-body=0