Menu

#107 c-icap-client Badd HTTP Header in RESPMOD

0.3.x
open
nobody
None
1
2018-09-20
2018-04-10
No

Hello,

I suspect there is a problem in the way c-icap-client builds a REQMOD request, here is an example from a packet capture:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
RESPMOD icap://swg01/Trustwave_RESPMOD ICAP/1.0
Host: swg01
User-Agent: C-ICAP-Client-Library/0.01
Allow: 204
Encapsulated: req-hdr=0, res-hdr=100, null-body=194

GET http://test.url.com HTTP/1.0
Date: Tue Apr 10 20:40:30 2018
User-Agent: C-ICAP-Client/x.xx

Date: Tue Apr 10 20:40:30 2018
Last-Modified: Tue Apr 10 20:40:30 2018
Content-Length: 0

ICAP/1.0 502 Bad Response (Bad HTTP Header)
Server: Trustwave SWG Vital Security
ISTag: "11827254"
Connection: close
Encapsulated: null-body=0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I think it is missing an HTTP response code, as HTTP header should look like:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HTTP/1.1 200 OK
Date: Tue Apr 10 20:40:30 2018
Last-Modified: Tue Apr 10 20:40:30 2018
Content-Length: 0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

c-icap-client is 0.5.3 and the command line is:

$ ./c-icap-client -i swg01 -s Trustwave_RESPMOD -resp "http://test.url.com" -v

Am I doing something wrong or is it a bug?

Thank you,
Eric

Discussion

  • Anonymous

    Anonymous - 2018-04-24

    I encountered it also, it is definitelly a bug.

    See https://tools.ietf.org/html/rfc3507#section-4.4.2

    "HTTP headers MUST start with the request-line or
    status-line for requests and responses, respectively, followed by
    interesting HTTP headers"

     
  • chtsanti

    chtsanti - 2018-05-09

    This is a bug which exist in c-icap-0.3.x and earlier releases.
    This is should not exist in c-icap-0.4.x and c-icap-0.5.x releases.

     
  • chtsanti

    chtsanti - 2018-09-20
    • Group: 0.5.x --> 0.3.x
     
  • chtsanti

    chtsanti - 2018-09-20

    The "User-Agent: C-ICAP-Client-Library/0.01" header also shows an old c-icap release.

    I am marking this as c-icap-0.3.x bug., and leave it open in the case someone wants to fix it for c-icap-0.3.x releases.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB