Recently i found that i am getting EConvertError after calling IDHTTP.GET. I analyzed the traffic and saw the expire date on the cookie is 2000. Now my question is how to bypass this. I am using the Indy10 that is present in XE3. I know Indy follows strict standard about cookie handling but shouldn't there be a feature to turn this off ?
URL: https://graph.facebook.com/me?access_token=ACCESS_TOKEN
StackTrace:
:75a5c41f KERNELBASE.RaiseException + 0x58
System.SysUtils.ConvertErrorFmt($412994,(...))
System.SysUtils.StrToInt('')
IdGlobal.IndyStrToInt('')
IdGlobalProtocols.RawStrInternetToDateTime('',0)
IdGlobalProtocols.GMTToLocalDateTime('')
IdHTTPHeaderInfo.TIdEntityHeaderInfo.ProcessHeaders
IdHTTPHeaderInfo.TIdResponseHeaderInfo.ProcessHeaders
IdHTTP.TIdHTTPProtocol.RetrieveHeaders(???)
Response Headers:
(Status-Line) HTTP/1.1 200 OK
Access-Control-Allow-Origin *
Cache-Control private, no-cache, no-store, must-revalidate
Content-Type text/javascript; charset=UTF-8
ETag "676c539ac3cd7161f5492ce95d72d8b620c6fa6c"
Expires Sat, 01 Jan 2000 00:00:00 GMT
Last-Modified 2012-12-20T20:08:20+0000
P3P CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
Pragma no-cache
X-FB-Rev 702819
X-UA-Compatible IE=edge,chrome=1
Set-Cookie m_ts=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.facebook.com; httponly
Set-Cookie reg_ext_ref=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.facebook.com
Set-Cookie reg_fb_gate=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.facebook.com
Set-Cookie reg_fb_ref=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.facebook.com
X-FB-Debug kZmwuLCRhfhJBKfLoQEbTOBJNyKQGUKLEeJ2R2rcxXg=
Date Fri, 28 Dec 2012 10:02:19 GMT
Connection keep-alive
Content-Length 1932
TIdCustomHTTP.ProcessCookies(),TIdCookieManager.AddServerCookies(), andTIdCookie.ParseServerCookie()methods are not included in the call stack you showed. It has to be coming from either theLast-ModifiedorExpiresheader (or lack of), as those are the only headers thatTIdEntityHeaderInfo.ProcessHeaders()directly callsGMTToLocalDateTime()for without checking for blank values first. - Remy LebeauRawStrInternetToDateTime(), and thusGMTToLocalDateTime(), does not raise an exception when passed a blank string, so there has to be a non-blank malformed header value being sent by the server. Please show the actual headers. - Remy LebeauLast-Modifiedheader that is at fault. It is not using a supported string format that conforms to theHTTP-datedefinition in RFC 2616 Section 3.3 and used by RFC 2616 Section 14.29. That is a bug in Facebook's HTTP server. They should have known better than to use that non-standard format for an HTTP date header. That bug needs to be reported to Facebook. so they can fix it. - Remy LebeauTIdHTTPcan now parsee ISO 8601 dates. - Remy Lebeau