Article View: borland.public.cppbuilder.internet.web
Article #1104Re: IdHTTP Get exception
From: Keith
Date: Fri, 06 May 2005 12:10
Date: Fri, 06 May 2005 12:10
38 lines
1870 bytes
1870 bytes
"Remy Lebeau (TeamB)" wrote:
> "Keith" <kdopson@sbcglobal.net> wrote in message
> news:427AC3FE.C00C80D0@sbcglobal.net...
>
> > Indy 9.00.11 (2003)
>
>
Thanks for the suggestion. Updating had no effect, though.
The exception occurs when
FExpires := GMTToLocalDateTime(Values['Expires']); {do not localize}
and Values['Expires'] is a pointer to the null-terminated string -1, as:
-1\0
or '-1'
This is from procedure TIdEntityHeaderInfo.ProcessHeaders;
function GMTToLocalDateTime(S: string): TDateTime; calls
Result := RawStrInternetToDateTime(S); passing a pointer to -1 as S
This causes Result := EncodeDate(Yr, Mo, Dt); to pass Yr=1900, Mo=0,
Dt=-1, and an exception is thrown by Sysutils::EncodeDate
So, all in all, when the HTTP header string Values['Expires'] either is -1, or
is set to -1, then the problem exists.
keith
Technical Details
Message-ID:
<427B5EAC.786B8D70@sbcglobal.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<427AB1E6.60A6005E@sbcglobal.net> <427ab842$1@newsgroups.borland.com> <427AC3FE.C00C80D0@sbcglobal.net> <427b34fe$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,b8c33a2643ef426e X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <427B5EAC.786B8D70@sbcglobal.net> Date: Fri, 06 May 2005 07:10:20 -0500 From: Keith <kdopson@sbcglobal.net> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: Re: IdHTTP Get exception References: <427AB1E6.60A6005E@sbcglobal.net> <427ab842$1@newsgroups.borland.com> <427AC3FE.C00C80D0@sbcglobal.net> <427b34fe$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 65.71.227.85 X-Trace: newsgroups.borland.com 1115381195 65.71.227.85 (6 May 2005 05:06:35 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail