[Kst] extragear/graphics/kst/src/datasources/naddirect

Eli Fidler eli at staikos.net
Tue May 16 23:44:44 CEST 2006


SVN commit 541647 by fidler:

handle errors in data stream


 M  +5 -0      nadconnection.cpp  


--- trunk/extragear/graphics/kst/src/datasources/naddirect/nadconnection.cpp #541646:541647
@@ -556,6 +556,11 @@
     while (!bufStr.isEmpty() && bufStr.at(1) != '\n') {
       if (bufStr.left(16) == "Content-Length: ") {
         chunkLength = bufStr.mid(16).toInt();
+      } else if (bufStr.left(14) == "Content-type: ") {
+        if (bufStr.mid(14).left(24) != "application/octet-stream") {
+          kstdDebug() << "NAD: error in data stream" << endl;
+          return -1;
+        }
       }
       bufStr = respTStream.readLine();
     }


More information about the Kst mailing list