Why does my application close down at the last given row below? (starting
the active scheduler):
iDataChunkCount = 0;
TUriParser8 uri;
uri.Parse(aUri);
RStringF method = iSess.StringPool().StringF(HTTP::EPOST,
RHTTPSession::GetTable());
iTrans = iSess.OpenTransactionL(uri, *iTransObs, method/*aMethod*/);
RHTTPHeaders hdr = iTrans.Request().GetHeaderCollection();
// Add headers appropriate to all methods
SetHeaderL(hdr, HTTP::EUserAgent, KUserAgent);
// Content type header
TBuf8<KMaxContentTypeSize> contTypeBuf;
_LIT(KTextHtml, "text/html"😉;
contTypeBuf.Copy(KTextHtml);
RStringF contTypeStr = iSess.StringPool().OpenFStringL(contTypeBuf);
THTTPHdrVal contType(contTypeStr);
hdr.SetFieldL(iSess.StringPool().StringF(HTTP::EContentType,
RHTTPSession::GetTable()), contType);
contTypeStr.Close();
MHTTPDataSupplier* dataSupplier = this;
iTrans.Request().SetBody(*dataSupplier);
iTrans.SubmitL(); //Submit the transaction
//Start the scheduler, once the transaction completes or is cancelled on an
error the scheduler
// will be stopped in the event handler
CActiveScheduler::Start();