Hi Angus

The first one was to big in length (45k with a limit of 40k) and was parked waiting for moderator approval. Three days after I tried to send a new one with only start and end of debug file. I don't know what happened with the contents. Next is the post I tried to post last time with.

I added a PostButton to OverbyteIcsHttpsTst example, as suggested RTT.
The problem is always I get error. I need help to interpret debug file, let me know how to send the full debug.
I would appreciate any help.


PostButton click event:

void __fastcall THttpTestForm::PostButtonClick(TObject *Sender)
{
    AnsiString asPost;
    try {
        PrepareConnection();
        Display("Connecting...");
        PostButton->Enabled = FALSE;
        DocumentMemo->Clear();
        SslHttpCli1->SendStream = new TStringStream();
        asPost = PostMemo->Text;
        SslHttpCli1->SendStream->WriteBuffer(&asPost, asPost.Length());
        SslHttpCli1->PostASync();
    } catch (Exception& E) {
        Display("Connect error. " + E.ClassName() + ": " + E.Message);
        return;
    }
}


Example text to post:
{
"username": "demouser",
"password": "demopassword",
"clientid": "democlient",
"signature": "f84WG29dH2gpMMGcvIV86DCLY+8="
}

DocumentMemo result:
Content type is application/xml; charset=utf-8
Document stored in "Validate" Size=393

Validate file content:
<Fault xmlns="http://schemas.microsoft.com/ws/2005/05/envelope/none";><Code><Value>Sender</Value> </Code><Reason><Text xml:lang="es-ES">El creador de este error no especificó una razón.</Text></Reason> <Detail><ServiceError xmlns="Microsoft.Samples.DistributedServices.Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance";>
<ErrorMessage>PANIC!</ErrorMessage></ServiceError></Detail></Fault>

Debug_Out_HttpsTst.tx content (start and end, full contents can't be included as post goes up of 40k):
21:43:22:916 State = httpNotConnected
21:43:22:917 Login www.aaaaaa.net
21:43:22:918 State = httpDnsLookup
21:43:23:014 State = httpDnsLookupDone
21:43:23:014 connect to xxx.xxx.xxx.xxx/443
21:43:23:016 022A4070 Socket handle created 592
21:43:23:017 TWSocket will connect to xxx.xxx.xxx.xxx:443
21:43:23:053 SessionConnected
21:43:23:054 State = httpConnected
21:43:23:057 State = httpWaitingHeader
21:43:23:060 9 header lines to send
POST /validation/v1/Validate HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Connection: Keep-Alive
Accept-Language: en, fr
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; ICS)
Host: www.aaaaaa.net
Proxy-Connection: Keep-Alive
Content-Length: 0

21:43:23:081 022A4070 PutDataInSslBuffer 592 len 317  [1]
21:43:23:084 022A4070 SslTryToSend 592
21:43:23:086 SendRequest Done
21:43:23:088 022A4070 StartSslHandshake 592
21:43:23:556 022A4070 InitSSLConnection 592
21:43:23:557 022A4070 BIO_ctrl(sslbio, BIO_C_SET_SSL, BIO_NOCLOSE, 0x7B57A0) = 1 [2]
21:43:23:558 022A4070 ICB> SSL_CB_HANDSHAKE_START

... (removed lines to avoid size limit)

21:45:34:430 022A4070 TriggerSslShutDownComplete(0) 592
21:45:34:432 022A4070 TCustomWSocket.Shutdown 1 592
21:45:34:433 022A4070 TriggerEvent sslFdClose 592
21:45:34:435 022A4070 SslShutdownCompleted *1* 592
21:45:34:436 022A4070 SslAsyncSelect 592, 32 FD_CLOSE
21:45:34:437 022A4070 TCustomSslWSocket.Do_FD_CLOSE error #0 592
21:45:34:439 022A4070 BIO_ctrl_pending(sslbio) = 0   [165]
21:45:34:441 022A4070 Socket data pending: 0 Err: 0 592
21:45:34:442 022A4070 FCloseInvoked=0 592
21:45:34:444 SessionClosed Error: 0
21:45:34:446 022A4070 ResetSslSession 592


Tanks in advance,

Xavi

--
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

Reply via email to