Multi Header
Gerom opened this issue · 1 comments
Gerom commented
Hello,
I think there was an error if you use multiple header
unit w32internetaccess;
function TW32InternetAccess.doTransferRec
....
HttpAddRequestHeadersA(hfile,
pchar(additionalHeaders), length(additionalHeaders[i]),
HTTP_ADDREQ_FLAG_REPLACE or HTTP_ADDREQ_FLAG_ADD)
i use this code :
HttpAddRequestHeadersA(hfile,
PChar(additionalHeaders[i]+#13#10#0), dword(-1),
HTTP_ADDREQ_FLAG_REPLACE OR HTTP_ADDREQ_FLAG_ADD)
benibela commented
Such a silly mistake.
But isn't it enough to change it to PChar(additionalHeaders[i])
? I do not think the line break is needed when adding only a single header