4 Replies Latest reply on Apr 17, 2014 9:49 AM by eelsasser

    MWG7 - ICAP Scanning - Issue with File Names since Upgrading to 7.3.2.8.0

    brinkn

      Good moring

           Since upgrading to the 7.3.2.8.0 MWG I am experiencing some issues with ICAP scanning when the submitted file contains a space in the name.  Prior to the upgrade I was able to up submit files with a space in the name.  Since the upgrade when I attempt to submit a file with a space in the name I am not getting the expected results. 

       

      For example here is a packet capture conversation where I submitted a file called "test 1.txt".  There is no log created in the access log, and even with tracing turned on I dont get a tracing file created.

       

      <code>

      RESPMOD icap://192.168.1.1:1344/RESPMOD ICAP/1.0

      Allow: 204

      Connection: close

      Host: 192.168.1.1

      X-Client-IP: 192.168.1.2

      Encapsulated: req-hdr=0, res-hdr=78, res-body=145

         GET http://192.168.1.2/1397737633/test 1.txt HTTP/1.1

      Host: 192.168.1.2

       

      HTTP/1.1 200 OK

      Transfer-Encoding: chunked

      Content-Length: 16

      10

       

      asdjkfhsdjfhsd.

       

      0

      </code>

       

      Here is a packet capture conversation where I submitted a file called "test1.txt".  The difference is that I do get back the ICAP and X-WWBlockResult I expect and there is a log created in the access log.

       

      <code>

      RESPMOD icap://192.168.1.1:1344/RESPMOD ICAP/1.0

      Allow: 204

      Connection: close

      Host: 192.168.1.1

      X-Client-IP: 192.168.1.2

      Encapsulated: req-hdr=0, res-hdr=76, res-body=143

         GET http://192.168.1.2/1397737550/test.txt HTTP/1.1

      Host: 192.168.1.2

         HTTP/1.1 200 OK

      Transfer-Encoding: chunked

      Content-Length: 12

      c

      ksdfjsdlkf

       

      0

       

      ICAP/1.0 204 No modification needed

      ISTag: "00002916-11.144.8-00007410"

      X-WWBlockResult: 0

      </code>

       

       

      I searched the changed logs and can not find any mention of that change that would affect this behavior.  Is it possible that someone else can test their installation and see if they have similar behavior?  Does anyone know of a fix?

       

      Message was edited by: brinkn on 4/17/14 7:52:47 AM CDT
        • 1. Re: MWG7 - ICAP Scanning - Issue with File Names since Upgrading to 7.3.2.8.0

          Hi Nick,

          I have not noticed that behaviour before, i'll have to test. Most of the time the ICAP client does a URL encoding to change spaces to %20.

          You must have some code that does not do that. (probably from me

           

          We might be able to insert a rule that converts the URL to String.ReplaceAll(URL," ","%20") to see if the rules can intercept it before processing.

           

           

           

          • 2. Re: MWG7 - ICAP Scanning - Issue with File Names since Upgrading to 7.3.2.8.0

            Ok. I just tested now. You cannot alter the URL as I described above.

             

            The only way i can get this to work is in the original ICAP client by doing a URL encode of the filename before the request is made.

            1 of 1 people found this helpful
            • 3. Re: MWG7 - ICAP Scanning - Issue with File Names since Upgrading to 7.3.2.8.0
              brinkn

              Thanks Erik!

               

                   I would never talk crap about your ICAP code, it is the only example client that runs on windows.  (However, It did crash on me when I tried to send a file with a space.  )    Do you have an older 7.3 MWG that you can test against?  I absolutly agree with you that they should be URI encoded prior to being sent to the gateway, it just bothers me that it stopped working and I dont know why.  (Other then I upgraded to the latest release)  Here are a few logs from prior to the upgrade that show successfuly uploades when the file contained a space that at the time worked.

               

               

               

              [11/Apr/2014:10:55:50 -0400] "" 255.255.255.255 200 "GET http://192.168.1.1/20140411105550/063-602 2013 Sample Summary.pdf HTTP/1.1" "" "Unverified" "" 0 "" "" "0"

              [11/Apr/2014:10:58:59 -0400] "" 255.255.255.255 200 "GET http://192.168.1.1/20140411105859/335-140410 HBC.txt HTTP/1.1" "" "Unverified" "" 0 "" "" "0"

              [11/Apr/2014:11:07:02 -0400] "" 255.255.255.255 200 "GET http://192.168.1.1/20140411110701/Redacted_ABC_Prescreen DEF_4.14.doc HTTP/1.1" "" "Unverified" "" 0 "" "" "0"

              [11/Apr/2014:11:22:16 -0400] "" 255.255.255.255 200 "GET http://192.168.1.1/20140411112216/030-80459 2013 Test File.pdf HTTP/1.1" "" "Unverified" "" 0 "" "" "0"

              • 4. Re: MWG7 - ICAP Scanning - Issue with File Names since Upgrading to 7.3.2.8.0

                The current ICAP client i use has the line:

                 

                string httpRequest = "GET http://" + xClientIP + "/" + DateTime.Now.Ticks.ToString() + "/" + Uri.EscapeUriString(Path.GetFileName(fileOnDisk)) + " HTTP/1.1\r\nHost: " + xClientIP + "\r\n\r\n";

                 

                I probably changed it when I discovered a change in the MWG code.

                 

                I retested as far back as 7.3.2.0 and it still doesn't like the spaces, so you must have been using an older version before that.