This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SAVDID : "ICAP/1.0 505 Unsupported protocol or version "

Hi

We are integrating our application with SAVDID and the SAVDID is throwing an error "ICAP/1.0 505 Unsupported protocol or version ". Below is the RESPMOD Request:

RESPMOD icap://localhost:1344/AVSCAN?action=SCAN ICAP/1.0

Host: localhost:1344

Preview: 4

Allow: 204

Encapsulated: req-hdr=0 res-hdr=83 res-body=130

GET localhsot/C:\Users\prasad\Downloads\eicar.com.txt HTTP/1.1Host: localhost
HTTP/1.1 200 OKTransfer-Encoding: chunked


4  

[Preview four bytes of data]

0

If we send only options message as below we get the proper response.

Sent:

OPTIONS icap://localhost:1344/avscan ICAP/1.0 

Host localhost

Received:

ICAP/1.0 200 OKIS

Tag: "1-01-3-26-28-FDADC8A5"

Service: Sophos Anti-Virus SAVDI/ICAP

Date: Wed, 14 Dec 2011 08:05:05 GMT

Methods: RESPMOD

Transfer-Complete: *

Options-TTL: 3500Encapsulated: null-body=0

Any help is appreciated. Thanks

:19783


This thread was automatically locked due to age.
Parents
  • Hi,

    The java differs from what is shown.

    The line:
    output.writeBytes(header + reqheader + resheader + "Content-Length: " +Long.toHexString(file_length) + "\r\n");


    has an extra Content-Length line. This line is not shown on his output and if present would mess things up. That line should be included in the resheader:-


    String resheader = "HTTP/1.1 200 OK\r\n" +"Transfer-Encoding: chunked\r\n" +"Content-Length: " + Long.toHexString(file_length) + "\r\n" + "\r\n";


    So the line above is simply

    output.writeBytes(header + reqheader + resheader);


    and followed by

    chunk = Long.toHexString(file_length) + "\r\n"output.writeBytes(chunk)output.writeBytes(file)output.writeBytes("\r\n0\r\n\r\n");


    The question is: where did that Content_Length come from?

    Was it always there and just not reported?

    Regards,

    Jak

    :19951
Reply
  • Hi,

    The java differs from what is shown.

    The line:
    output.writeBytes(header + reqheader + resheader + "Content-Length: " +Long.toHexString(file_length) + "\r\n");


    has an extra Content-Length line. This line is not shown on his output and if present would mess things up. That line should be included in the resheader:-


    String resheader = "HTTP/1.1 200 OK\r\n" +"Transfer-Encoding: chunked\r\n" +"Content-Length: " + Long.toHexString(file_length) + "\r\n" + "\r\n";


    So the line above is simply

    output.writeBytes(header + reqheader + resheader);


    and followed by

    chunk = Long.toHexString(file_length) + "\r\n"output.writeBytes(chunk)output.writeBytes(file)output.writeBytes("\r\n0\r\n\r\n");


    The question is: where did that Content_Length come from?

    Was it always there and just not reported?

    Regards,

    Jak

    :19951
Children
No Data