BUG: ATL 7.0 fails if chunk size is 07ff (2047 bytes)
-
Hi Folks, I am using Microsoft Visual Studio .NET 2003 (Visual C++ 7.1) to access a webservice. Scenario is: I make a call to one of the methods of webservice. The call goes succesfully through the webservice. However, it fails while reading the response back from the webservice. This happens for a specific case if the chunk size is 07ff or 0800 bytes. Here, chunk size is the size of the SOAP response (it does not include HTTP header & footer size). Technically it is the value calculated as nChunkSize on line 1818 in atlhttp.inl. The code line is: cresult = get_chunked_size(chunk_buffer, chunk_buffer_end, &nChunkSize); The call fails because a value of LEX_ERROR is set by the "consume_chunk_footer" function of atlhttp.inl. It seems to me that in this particular case, the socket reads 1 byte less than the actual no. of bytes to be read, and so, it does not find the character '\n' which makes this function to return LEX_ERROR instead of LEX_OK. I have tested this taking various data. But it fails only for the above scenario. This seems to be a definite BUG. However, I am not sure if the patch already exists for it. If someone has any workarounds, do let me know. Regards, Arun Gupta.