Change to Content-Range handling in TIdHTTP

A little background:

In Indy 9, the TIdEntityHeaderInfo.ContentRange(Start|End) properties were used to handle the HTTP ‘Range’ header in requests, and the HTTP ‘Content-Range’ header in responses.

In Indy 10, new TIdRequestHeaderInfo.Range(s) properties were added to handle the ‘Range’ header in requests, and the TIdEntityHeaderInfo.ContentRange(Start|End) properties were updated to handle just the ‘Content-Range’ header in both requests and responses.

At some point before 2008 (I can’t pinpoint the exact time), prior to the release of Delphi 2009, TIdEntityHeaderInfo and TIdResponseHeaderInfo were updated to send a ‘Content-Range’ header only in responses, not in requests anymore. I don’t know why. My guess is that it was probably believed at the time that only responses would ever carry that header.

Fast Forward to Today:

Some modern REST APIs, such as Microsoft’s Graph API, do use the ‘Content-Range’ header in requests. So, the logic to send a ‘Content-Range’ header has been moved from TIdResponseHeaderInfo back into TIdEntityHeaderInfo so that header can now be used in both requests and responses once again.