There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
HTTP_Response() does not handle chunked transfer encoding
Sites like ThingSpeak and SmartEnergyGroups use chunked transfer encoding instead of specifying the content length header. Since the current code does not understand this, the response has extra lines before and after the actual content.
I fixed this by searching for the Content-Length header in the response and if it is not there adjusting the ResponseBodyLength and ResponseBody to remove the encoding information and leave the actual content.
Doing this uncovered the bug in the header checking because Content-Length is longer than some other headers.
I have a fix for this issue.