1 Reply Latest reply on Mar 27, 2020 6:08 AM by GauravS_31

    bug with string check part in http_client.c


      Hello Cypress IoT team,



      This thread is related to "https://community.cypress.com/message/223831#223831"


      With the current WiCED6.2.1 code,string comparison is performed not only in the HTTP header but also in the body.  
      So WiCED client cannot receive contents if the contents have string "Transfer-Encodeing : chunked".

      Since the WiCED specification does not support "transfer encoding",
      we deleted the "if statement" which to confirm the existence of "HTTP_HEADER_CHUNKED" .
      We modified WiCED source code "WICED-Studio-6.2\43xxx_Wi-Fi\libraries\protocols\HTTP_client\http_client.c".
      The patch is attached.
      Then, it seems that the expected behavior is confirmed at our site.


      [Need Help]
      Please review the attached patch. Do you have any concerns ?


      Best Regards,

        • 1. Re: bug with string check part in http_client.c

          I have checked the patch file and tested the same in our setup using httpbin snip. We do not see any issue while testing. In the patch, the condition if ( strnstrn( (char*)data, fragment_available_data_length, HTTP_HEADER_CHUNKED, sizeof( HTTP_HEADER_CHUNKED ) - 1 ) ) has been removed which is fine since it will execute an empty section. The else condition has been removed so that the remaining statements would execute unconditionally which is fine.