I just converted a piece of code to CB2009 (coming from BCB5), not
originally written by myself, so it's a bit searching what is what, but I
believe I run into a component issue. Meanwhile I created the same app in
BCB5 and there is works OK, using the same code.
I used HEAD version v7, checked out yesterday evening.
Can somebody confirm, possibly fix if it's an issue ?
The Problem:
On the receiving end (webpage) the the POST variable doesn't arrive intact.
Only the first letter. In this example case only "t" arrives (so "t = test"
instead of "test = test"
As suggested, the value arrives intact (in this case "test")
The essence I believe is the following
{code}
String PostData = "test=test" ;
THttpCli *HttpCli;
TMemoryStream *DataOut=NULL;
DataOut=new TMemoryStream;
#ifdef _DELPHI_STRING_UNICODE
DataOut->Write(&PostData[1], PostData.Length()*2); // CB2009
#else
DataOut->Write(&PostData[1], PostData.Length()); // BCB 5
#endif
DataOut->Seek(0,soFromBeginning);
HttpCli->SendStream=DataOut;
try
{
HttpCli->Post();
DataSuccessFullyDownloaded=true;
} __except (TRUE)
{
RawDataStringList->Add("ERROR_CODE="+IntToStr(HttpCli->StatusCode));
RawDataStringList->Add("ERROR_MESSAGE="+HttpCli->ReasonPhrase);
}
delete DataOut; DataOut=NULL;
}
{/code}
Any ideas ?
Can you repeat ?
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be