Index: /trunk/BNC/src/upload/bncuploadcaster.cpp
===================================================================
--- /trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9742)
+++ /trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9743)
@@ -248,13 +248,13 @@
           + "Host: " + _casterOutHost.toLatin1() + "\r\n"
           + "User-Agent: NTRIP BNC/" BNCVERSION " (" + BNC_OS + ")\r\n"
-          + "\r\n";      //cout << msg.toStdString().c_str();
+          + "\r\n";
       _outSocket->write(msg);
       _outSocket->waitForBytesWritten();
       _outSocket->waitForReadyRead();
 
-      QByteArray ans = _outSocket->readAll();      //cout << ans.toStdString().c_str() << endl;
+      QByteArray ans = _outSocket->readAll();
       if (ans.indexOf("200") == -1) {
-        emit(newMessage("Proxy: Connection broken for " + _mountpoint.toLatin1()
-                        + ": " + ans.left(ans.length() - 2), true));
+        int l = ans.indexOf("\r\n", 0);
+        emit(newMessage("Proxy: Connection broken for " + _mountpoint.toLatin1() + ": "  + ans.left(l-1), true));
         _outSocket->close();
         return;
@@ -293,10 +293,10 @@
   _outSocket->waitForReadyRead();
 
-   QByteArray ans = _outSocket->readAll();  //cout << "ans: " << ans.toStdString().c_str() << endl;
+   QByteArray ans = _outSocket->readAll();
 
   if (ans.indexOf("200") == -1) {
     _outSocket->close();
-    emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1() + ": "
-                    + ans.left(ans.length() - 2), true));
+    int l = ans.indexOf("\r\n", 0);
+    emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1() + ": " + ans.left(l-1), true));
   } else {
     emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1(), true));
