You are not logged in.
Pages: 1
Hi @ab, can you check line 1505/1508 in mormot.net.client.pas
I solve my problem with SockSend(ctxt.header) -> SockSend(ctxt.header, True)
Making simple POST request with data '1234', client receive #10#13'12'. '34' is also send but Content length is 4
Monitoring with wireshark I notice extra CRLF before data.
Hypertext Transfer Protocol
POST /api/v3/pin HTTP/1.1\r\n
Host: 10.0.12.108:8086\r\n
Accept: */*\r\n
User-Agent: Mozilla/5.0 (Win; mORMot 2.0.1 HCS)\r\n
Content-Length: 4\r\n
Accept: application/json\r\n
Content-Type: application/json\r\n
\r\n
[Full request URI: http://10.0.12.108:8086/api/v3/pin]
[HTTP request 1/1]
[Response in frame: 32]
File Data: 4 bytes
JavaScript Object Notation: application/json
Line-based text data: application/json (2 lines)
\r\n
12
Last edited by ttomas (2022-04-29 22:29:46)
Offline
Your headers should NOT have trailing CRLF when transmitted to THttpClientSocket.Request().
It should be trimmed now: https://github.com/synopse/mORMot2/commit/9e781b45
Online
Thanks @ab. Yes, problem is in my code in my descended class I use TStringList to AddHeaders and send StringList.Text as Header.
Have a nice holiday
Offline
Pages: 1