Bug in TIdHeaderList ?

Giganews Newsgroups
Subject: Bug in TIdHeaderList ?
Posted by:  Ted (torerikoge…@googlemail.com)
Date: Tue, 5 Aug 2008

Hi! Using Delphi 2007 / Indy 10.2.3 I get strange headers from a TidHttp.Get
request:

Name = Value pairs:
Content-Length = ontent-Length: 260'
Server = erver: Apache'

This is the code:

procedure TMyThread.IdHttpHeaders(Sender: TObject; AHeaders: TIdHeaderList;
var VContinue: Boolean);
(...)
for i := 0 to AHeaders.Count - 1 do
  Txt := AHeaders.Names[i] + ' = ' + AHeaders.ValueFromIndex[i];

Am I doing something wrong?  (btw, I've checked with Wireshark, the headers
are really correct on wire)

Ted

Replies