Ken Gartner
03-16-2005, 06:15 AM
The trouble ticket submission page does not allow selection of TU 2.0, so I'll post this here. I am running 2.0.0.0 on Windows XP.
HTTP file download has failed, but the GetHTTPErrorInfo() does not contain correct information in my test scenario.
My code resembles the example code for GetHTTPErrorInfo:
=================
-- Download the latest patch file, locally
local RemotePatchTOCFileURL = _DOWNLOAD_URLBASE.."/PatchTOC.ini";
local LocalPatchTOCFileName = _SourceFolder.."\\PatchTOC.ini";
TrueUpdate.WriteToLogFile("About to download from "..RemotePatchTOCFileURL.." to local "..LocalPatchTOCFileName.."\r\n", true);
HTTP.Download(RemotePatchTOCFileURL, LocalPatchTOCFileName);
if (Application.GetLastError() ~= 0) then
local httpStatus = HTTP.GetHTTPErrorInfo();
TrueUpdate.WriteToLogFile("HTTP Download Error "..httpStatus.Number.." while retrieving Patch TOC\r\n", true);
TrueUpdate.WriteToLogFile(httpStatus.Message.."\r\n", true);
end
================
Since an error was generated, the example shows that GetHTTPErrorInfo() should be called to retrieve the info about it. However, the HTTP download information is 'stale' or incorrect -- at least for me it shows the following in my log file:
================
[03/16/2005 07:10:11] About to download from http://gartner.dysanalytics.com/ecdeupdates/PatchTOC.ini to local C:\temp\ECDE0304B\ECDE_5.0\templates\PatchTOC.ini
[03/16/2005 07:10:11] Error Script: Server Script, [130]: HTTP.Download(RemotePatchTOCFileURL, LocalPatchTOCFileName); (2515)
[03/16/2005 07:10:12] HTTP Download Error 0 while retrieving Patch TOC
[03/16/2005 07:10:12] The operation completed successfully.
=================
This might be a documentation or product error. Can you clarify when GetHTTPErrorInfo() holds the proper error condition information, and when should I rely solely upon the Application.GetLastError() instead?
Thanks.
Ken Gartner
HTTP file download has failed, but the GetHTTPErrorInfo() does not contain correct information in my test scenario.
My code resembles the example code for GetHTTPErrorInfo:
=================
-- Download the latest patch file, locally
local RemotePatchTOCFileURL = _DOWNLOAD_URLBASE.."/PatchTOC.ini";
local LocalPatchTOCFileName = _SourceFolder.."\\PatchTOC.ini";
TrueUpdate.WriteToLogFile("About to download from "..RemotePatchTOCFileURL.." to local "..LocalPatchTOCFileName.."\r\n", true);
HTTP.Download(RemotePatchTOCFileURL, LocalPatchTOCFileName);
if (Application.GetLastError() ~= 0) then
local httpStatus = HTTP.GetHTTPErrorInfo();
TrueUpdate.WriteToLogFile("HTTP Download Error "..httpStatus.Number.." while retrieving Patch TOC\r\n", true);
TrueUpdate.WriteToLogFile(httpStatus.Message.."\r\n", true);
end
================
Since an error was generated, the example shows that GetHTTPErrorInfo() should be called to retrieve the info about it. However, the HTTP download information is 'stale' or incorrect -- at least for me it shows the following in my log file:
================
[03/16/2005 07:10:11] About to download from http://gartner.dysanalytics.com/ecdeupdates/PatchTOC.ini to local C:\temp\ECDE0304B\ECDE_5.0\templates\PatchTOC.ini
[03/16/2005 07:10:11] Error Script: Server Script, [130]: HTTP.Download(RemotePatchTOCFileURL, LocalPatchTOCFileName); (2515)
[03/16/2005 07:10:12] HTTP Download Error 0 while retrieving Patch TOC
[03/16/2005 07:10:12] The operation completed successfully.
=================
This might be a documentation or product error. Can you clarify when GetHTTPErrorInfo() holds the proper error condition information, and when should I rely solely upon the Application.GetLastError() instead?
Thanks.
Ken Gartner