Changeset 44 in cheroxy for trunk/src/main.cpp
- Timestamp:
- 11/22/12 15:21:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main.cpp
r36 r44 91 91 } 92 92 93 if ((aProxy = CRXProxy::GetNewInstance()) == NULL)93 if ((aProxy = new(std::nothrow) CRXProxy ()) == NULL) 94 94 { 95 95 cerr << "Failed to get proxy." << endl; … … 114 114 aHttpMessageLength = aProxy->GetHttpRequestLength (); 115 115 aHttpMessage = (char *) calloc (aHttpMessageLength + 1, 1); 116 cout << aProxy->GetHttpRequest (aHttpMessage, aHttpMessageLength) << endl; 116 aProxy->GetHttpRequest (aHttpMessage, aHttpMessageLength); 117 CRX_DEBUG_TRACE ("== Request: \n%s\n", aHttpMessage); 117 118 free (aHttpMessage); 118 119 119 120 aHttpMessageLength = aProxy->GetHttpResponseHeaderLength (); 120 121 aHttpMessage = (char *) calloc (aHttpMessageLength + 1, 1); 121 cout << aProxy->GetHttpResponseHeader (aHttpMessage, aHttpMessageLength) << endl; 122 aProxy->GetHttpResponseHeader (aHttpMessage, aHttpMessageLength); 123 CRX_DEBUG_TRACE ("== Response: \n%s\n", aHttpMessage); 124 free (aHttpMessage); 125 126 aHttpMessageLength = aProxy->GetHttpResponseBodyLength (); 127 aHttpMessage = (char *) calloc (aHttpMessageLength + 1, 1); 128 aProxy->GetHttpResponseBody (aHttpMessage, aHttpMessageLength); 129 CRX_DEBUG_TRACE_BIN (aHttpMessage, aHttpMessageLength, "== Content-Body: \n"); 122 130 free (aHttpMessage); 123 131 } 124 132 125 aProxy->ReleaseInstance ();133 delete aProxy; 126 134 } 127 135
Note:
See TracChangeset
for help on using the changeset viewer.