#1 2024-12-31 14:35:01

ttomas
Member
Registered: 2013-03-08
Posts: 139

TSimpleHttpClient TWinHttp return empty Headers

Some regression in last 5-6 month, today I update to trunk!
FPC/Win32/64, my client TSimpleHttpClient return empty headers string in response, response body is OK, valid json response, 200.
TCurlHttp is OK return headers, ReplaceMainHttpClass(TCurlHttp), but default TWinHttp is broken. TSimpleHttpClient.Headers

Offline

#2 2024-12-31 15:31:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,793
Website

Re: TSimpleHttpClient TWinHttp return empty Headers

I am not able to reproduce it.

TWin-Http-Headers.png

Or is it because you have more than 4KB of header content?
If it is the case, https://github.com/synopse/mORMot2/commit/a734f787 may help.

Offline

#3 2025-01-01 19:56:44

ttomas
Member
Registered: 2013-03-08
Posts: 139

Re: TSimpleHttpClient TWinHttp return empty Headers

Thanks @ab, problem solved.
Strange raw response with vscode including small body {"count": 8} is 2832 Bytes. But yes dwSize before QueryHeaders exec is 4108 and after is 5640 > 4KB

Last edited by ttomas (2025-01-01 19:57:54)

Offline

Board footer

Powered by FluxBB