httpstream: reintroduce d318d544cf76ea58c4f12bccc0541d888af7570c:
authorErik Slagter <erik@openpli.org>
Fri, 8 Aug 2014 08:54:39 +0000 (10:54 +0200)
committerErik Slagter <erik@openpli.org>
Fri, 8 Aug 2014 08:54:39 +0000 (10:54 +0200)
handle chunked transfers for statuscode 200

As suggested by malakudi, "transfer-encoding: chunked" is allowed for all
http status codes, not just 206. So check for chunked transfers on 200 as well.

lib/base/httpstream.cpp

index 0a1174e..dbc19e8 100644 (file)
@@ -154,7 +154,7 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
                        break;
                }
 
-               if (statuscode == 206 && !strncasecmp(linebuf, "transfer-encoding: chunked", strlen("transfer-encoding: chunked")))
+               if (((statuscode == 200) || (statuscode == 206)) && !strncasecmp(linebuf, "transfer-encoding: chunked", strlen("transfer-encoding: chunked")))
                {
                        isChunked = true;
                }