Re: Possible file download bug?

Allan Clark <[email protected]>
Newsgroups gmane.comp.gcc.cross-compiling
Message-ID <[email protected]>

> On Sep 28, 2018, at 06:11, Paul Smith <[email protected]> wrote:
> 
> Crossgcc,
> 
> 
> I wanted to alert you to a possible bug.  I'm using someone else's product that uses an old copy of Crossgcc and I've found the following issue, and from looking at the latest Crossgcc code I suspect the same bug still exists.
> 
> 
> The issue is in scripts/functions in the code that downloads a file from the web using wget or curl.  My local ISP 'catches' page load errors and returns their own generated HTML error page and the bug I'm seeing results from a file download believing it succeeded when actually it downloaded just a dummy HTML page.
> 
> 
> In my case the files were always supposed to be variants on Linux tar files so it easy to use the Linux 'file' command to see if the file was actually an HTML page.  I don't know whether you can do the same or whether the files you are downloaded are more diverse and need more careful checking, perhaps outside of the file download function.
> 
> 
> However I wanted to alert you to this odd behaviour as it soaked up a few hours this morning identifying the cause and a fix.

When the file is not found for download, does the ISP forward a 4xx or 5xx error code, or a 200 as though nothing went wrong?

Allan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.