icap消息格式

Sample request-response examples are as shown below -
(Note: all lines are terminated by a '\r\n'. Blank lines correspond
to a '\r\n'. The request and response messages are delimited by '---'
for illustration. Message body formats are described instead of being
literally and redundantly depicted.

1) OPTIONS

Request from ICAP Client to ICAP server:
---------------------------------------------------------------------
OPTIONS icap://cherryhill.eng.netapp.com:1344/virus_checking ICAP/1.0
Server-rhdr : Host: cherryhill.eng.netapp.com:1344

---------------------------------------------------------------------

Response from ICAP Server to ICAP Client:
---------------------------------------------------------------------
ICAP/1.0 200 OK
ISTAG: "5BDEEEA9-12E4-2"
Server: XYZ Technology Virus Scanning Software 5.0 ( XYZT 5.0 )
Max-Connections: 1000
Methods: RESPMOD, REQMOD, LOG, OPTIONS
Options-TTL: 300

---------------------------------------------------------------------

2) RESPMOD (w/o Preview)

Request from ICAP Client to ICAP server:
---------------------------------------------------------------------
RESPMOD icap://cherryhill.eng.netapp.com:1344/virus_checking ICAP/1.0
Encapsulated: req-hdr=0 res-hdr=341 res-body=578

GET / HTTP/1.1
Host: www.google.com
Connection: keep-alive
User-Agent: Mozilla/4.72 [en] (WinNT; U)
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Cookie: PREF=ID=6f64a0970a9df2ea:TM=978561529:LM=978561529

HTTP/1.0 200 OK
Date: Wed, 18 Apr 2001 17:55:37 GMT
Content-Length: 1953
Content-Type: text/html
Proxy-Connection: keep-alive
Server: GWS/1.10
Via: 1.1 viv1 (NetCache NetApp//n/ronco/build/scratch/viv/vivmain.1682.025_17_25_48)

<chunk size in hex>\r\n
<data with bytes=chunk size>\r\n
\r\n

<chunk size in hex>\r\n
<data with bytes=chunk size>\r\n
\r\n

0\r\n
\r\n
---------------------------------------------------------------------

Response from ICAP Server to ICAP Client:
---------------------------------------------------------------------
ICAP/1.0 200 OK
ISTAG: "5BDEEEA9-12E4-2"

HTTP/1.0 200 OK
Date: Wed, 18 Apr 2001 18:06:05 GMT
Content-Length: 1953
Content-Type: text/html
Proxy-Connection: keep-alive
Server: GWS/1.10
Via: 1.1 viv1 (NetCache NetApp//n/ronco/build/scratch/viv/vivmain.1682.025_17_25_48)

<sizeof all chunks in hex>\r\n
<data>\r\n
0\r\n
\r\n
---------------------------------------------------------------------

3) RESPMOD (with Preview)

Request from ICAP Client to ICAP server:
---------------------------------------------------------------------
RESPMOD icap://cherryhill.eng.netapp.com:1344/virus_checking ICAP/1.0
Preview: 1024
Encapsulated: req-hdr=0 res-hdr=341 res-body=578
TE: trailers

GET / HTTP/1.1
Host: www.google.com
Connection: keep-alive
User-Agent: Mozilla/4.72 [en] (WinNT; U)
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Cookie: PREF=ID=6f64a0970a9df2ea:TM=978561529:LM=978561529

HTTP/1.0 200 OK
Date: Wed, 18 Apr 2001 18:10:52 GMT
Content-Length: 1953
Content-Type: text/html
Proxy-Connection: keep-alive
Server: GWS/1.10
Via: 1.1 viv1 (NetCache NetApp//n/ronco/build/scratch/viv/vivmain.1682.025_17_25_48)

400\r\n
<1024 bytes of preview Data>\r\n
0\r\n
\r\n
---------------------------------------------------------------------

Intermediate Response from ICAP Server:
---------------------------------------------------------------------
ICAP/1.0 100 Continue
---------------------------------------------------------------------

Remaining Request from ICAP Client:
---------------------------------------------------------------------
<chunk size in hex>\r\n
<data with bytes=chunk size>\r\n
\r\n

<chunk size in hex>\r\n
<data with bytes=chunk size>\r\n
\r\n

0\r\n
\r\n
---------------------------------------------------------------------

Final Response from ICAP Server to ICAP Client:
---------------------------------------------------------------------
ICAP/1.0 200 OK
ISTAG: "5BDEEEA9-12E4-2"

HTTP/1.0 200 OK
Date: Wed, 18 Apr 2001 18:06:05 GMT
Content-Length: 1953
Content-Type: text/html
Proxy-Connection: keep-alive
Server: GWS/1.10
Via: 1.1 viv1 (NetCache NetApp//n/ronco/build/scratch/viv/vivmain.1682.025_17_25_48)

<sizeof all chunks in hex>\r\n
<data>\r\n
0\r\n
Cache-Control: no-cache\r\n
Connection: close\r\n
\r\n
---------------------------------------------------------------------

4) REQMOD (w/o Preview)

Request from ICAP Client to ICAP server:
---------------------------------------------------------------------
REQMOD icap://cherryhill.eng.netapp.com:1344/virus_checking ICAP/1.0
Host: cherryhill.eng.netapp.com:1344
Encapsulated: req-hdr=0
Client-IP: 10.34.25.90
Server-IP: 216.239.37.100

GET http://www.google.com/ HTTP/1.0
Host: www.google.com
User-Agent: Mozilla/4.72 [en] (WinNT; U)
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Cookie: PREF=ID=6f64a0970a9df2ea:TM=978561529:LM=978561529
Via: 1.0 viv1 (NetCache NetApp//n/ronco/build/scratch/viv/vivmain.1682.025_17_25_48)
X-Forwarded-For: 10.34.25.90

---------------------------------------------------------------------

Response from ICAP Server to ICAP Client:
---------------------------------------------------------------------
ICAP/1.0 200 OK
Host: cherryhill.eng.netapp.com:1344
Encapsulated: req-hdr=0
Client-IP: 10.34.25.90
Server-IP: 216.239.37.100

GET http://www.google.com/ HTTP/1.0
Host: www.google.com
User-Agent: Mozilla/4.72 [en] (WinNT; U)
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Cookie: PREF=ID=6f64a0970a9df2ea:TM=978561529:LM=978561529
Via: 1.0 viv1 (NetCache NetApp//n/ronco/build/scratch/viv/vivmain.1682.025_17_25_48)
X-Forwarded-For: 10.34.25.90

---------------------------------------------------------------------
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值