nettools/conntest/Engine/HttpHandler.cpp
branchRCL_3
changeset 14 a17829cb5e59
parent 0 857a3e953887
child 20 e9dd2a415b0c
--- a/nettools/conntest/Engine/HttpHandler.cpp	Mon Mar 15 12:39:11 2010 +0200
+++ b/nettools/conntest/Engine/HttpHandler.cpp	Wed Mar 31 21:08:37 2010 +0300
@@ -31,7 +31,7 @@
 //const TInt KMaxSubmitSize = 2048;
 const TInt KMaxHeaderNameLen = 32;
 const TInt KMaxHeaderValueLen = 128;
-
+const TInt KMaxStatusStrLen = 32;
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -533,8 +533,10 @@
             RHTTPResponse resp = aTransaction.Response();
             TInt status = resp.StatusCode();
             RStringF statusStr = resp.StatusText();
-            TBuf<32> statusStr16;
-            statusStr16.Copy(statusStr.DesC());
+            const TDesC8& statusStrDesC = statusStr.DesC();
+            TBuf< KMaxStatusStrLen > statusStr16; 
+            statusStr16.Copy( statusStrDesC.Left( KMaxStatusStrLen ) );
+            
             TBuf<64> st;
             st.Format(_L("Status: %d (%S)\n"), status, &statusStr16);
             iConsole.PrintNotify(st);