Defect #1226

#1149 (download big files) does not work on 32 bit systems

Added by Blatti Yves about 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:12/11/2015
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:SHOP
Target version:4.4.0
Affected version:4.4.0

Description

#1149 (download big files) does not work on 32 bit server systems.
A file bigger than 2GB cannot have its size stored on a 32bits integer.
Problem: php filesize($file) will fail and HTTP header Content-Length will contain an erroneous size (and browsers will stop download @ ~2GB).

We cannot rely on filesize on this systems (return is unpredictable : http://php.net/manual/en/function.filesize.php#refsect1-function.filesize-returnvalues)
Proposal: do not send Content-Length on 32 bits systems, check this with PHP_INT_SIZE (4 = 32 bits, 8 = 64 bits)
Download will work, but there will be no size and time displayed on browsers.
Affected server are 32 bit linux (very rare), and 32+64 bits windows with PHP < 7 (Most of them).

History

#1 Updated by Blatti Yves about 3 years ago

  • Status changed from Affected to Resolved
  • % Done changed from 0 to 100

rev. 9347

#2 Updated by Blatti Yves almost 3 years ago

  • Status changed from Resolved to To merge

#3 Updated by Blatti Yves almost 3 years ago

  • Assignee changed from Blatti Yves to Van Hoecke Hélène

#4 Updated by Van Hoecke Hélène almost 3 years ago

  • Status changed from To merge to Closed

#5 Updated by Van Hoecke Hélène over 2 years ago

  • Assignee deleted (Van Hoecke Hélène )

Also available in: Atom PDF