nettools/conntest/Engine/HttpHandler.cpp
branchRCL_3
changeset 9 a17829cb5e59
parent 0 857a3e953887
child 16 12a3e9fe500f
equal deleted inserted replaced
8:86091f1c2f4d 9:a17829cb5e59
    29 
    29 
    30 // Size of buffer used when submitting request bodies
    30 // Size of buffer used when submitting request bodies
    31 //const TInt KMaxSubmitSize = 2048;
    31 //const TInt KMaxSubmitSize = 2048;
    32 const TInt KMaxHeaderNameLen = 32;
    32 const TInt KMaxHeaderNameLen = 32;
    33 const TInt KMaxHeaderValueLen = 128;
    33 const TInt KMaxHeaderValueLen = 128;
    34 
    34 const TInt KMaxStatusStrLen = 32;
    35 
    35 
    36 
    36 
    37 // ================= MEMBER FUNCTIONS =======================
    37 // ================= MEMBER FUNCTIONS =======================
    38 
    38 
    39 
    39 
   531             // HTTP response headers have been received. We can determine now if there is
   531             // HTTP response headers have been received. We can determine now if there is
   532             // going to be a response body to save.
   532             // going to be a response body to save.
   533             RHTTPResponse resp = aTransaction.Response();
   533             RHTTPResponse resp = aTransaction.Response();
   534             TInt status = resp.StatusCode();
   534             TInt status = resp.StatusCode();
   535             RStringF statusStr = resp.StatusText();
   535             RStringF statusStr = resp.StatusText();
   536             TBuf<32> statusStr16;
   536             const TDesC8& statusStrDesC = statusStr.DesC();
   537             statusStr16.Copy(statusStr.DesC());
   537             TBuf< KMaxStatusStrLen > statusStr16; 
       
   538             statusStr16.Copy( statusStrDesC.Left( KMaxStatusStrLen ) );
       
   539             
   538             TBuf<64> st;
   540             TBuf<64> st;
   539             st.Format(_L("Status: %d (%S)\n"), status, &statusStr16);
   541             st.Format(_L("Status: %d (%S)\n"), status, &statusStr16);
   540             iConsole.PrintNotify(st);
   542             iConsole.PrintNotify(st);
   541             
   543             
   542             
   544