l10n_project does check whether drupal_http_request() return a value, but that object can be just a sign of error, which is not taken into account. So we should add return status code checking as well before we go ahead and create the file. Also, add the HTTP error to the watchdog log, so we can monitor why such issues are happening. This will hopefully catch issues before we reach tar to untgz the file. Currently we have these kind of sequences in the watchdog log which are indicative of faulty targz files downloaded.

Monday, January 11, 2010 - 04:50
tar -xvvzf '...../feedfield-5.x-1.1.tar.gz' -C '...../tmp/l10n_project_KtrRDq_dir' failed with status 2
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

Monday, January 11, 2010 - 05:30
File sites/default/files/tmp/feedfield-5.x-1.1.tar.gz already exists.

Monday, January 11, 2010 - 05:30
Contents of sites/default/files/tmp/feedfield-6.x-1.1.tar.gz have been scanned.

Monday, January 11, 2010 - 05:50
Contents of sites/default/files/tmp/feedfield-5.x-1.1.tar.gz have been scanned.
CommentFileSizeAuthor
better-http-download.patch2.06 KBgábor hojtsy

Comments

gábor hojtsy’s picture

Status: Active » Fixed

Committed and deployed to localize.drupal.org.

gábor hojtsy’s picture

This already saved us one bugos release handling. Found in watchdog: Unable to download and save http://ftp.drupal.org/files/projects/aberdeen-6.x-1.8.tar.gz file (404 Not Found). Cool.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.