Please can someone (Remy Lebeau?) clarify the point on header line folding in TidHTTP? My server expects headers to be folded if the line exceeds 998 characters, which one of mine certainly will.
Among many other posts discussing this I saw this one which is a more or less definitive post from a while back where Remy says
by default the TIdHeaderList.FoldLines property is set to True
and
the default value of the TIdHeaderList.FoldLength property is 78
which seem to indicate that I don't need to do anything special to get my headers folded when using TIdHTTP.
However, looking at the source code of TidHTTP I find comments from Remy such as these
(in TIdCustomHTTP.Post
)
Currently when issuing a POST, IdHTTP will automatically set the protocol to version 1.0 independently of the value it had initially.
and
(in TIdHTTPProtocol.BuildAndSendRequest
)
TODO: disable header folding for HTTP 1.0 requests
Which appear to indicate that my request is going to be using HTTP 1.0 requests anyway, regardless if I ask for 1.1 or not and that the header lines will not be folded regardless.
My question therefore is simply; when using TidHttp ver 10.5498 do I need the lines
IdHTTP1.Request.CustomHeaders.FoldLines := true;
IdHTTP1.Request.CustomHeaders.FoldLength := 998; //could be less, but not more
or can I simply accept the defaults and be confident that my headers will be correctly folded?