32 bit file sizes in Apache HTTPD
Today I backed up some files from my Powerbook to a DVD image. Once I created the DVD image I was going to transfer it to my PC which is the home of my burner. How shall I transfer the file?I dumped the DVD image in my
~/Sites/
folder, which is the Mac-equivalent of ~/public_html
. But when I viewed that directory from my PC, the 4.37 GB file morphed into a 386 MB file. What the heck?
And now a math lesson. My file was 4.37 GB. More precisely: 4699488256 bytes. And unfortunately for me, 4699488256 > (232). In fact, 4.37 GB mod (232) = 386 MB.
Lesson learned? Apache file sizes are 32-bit. Don't transfer anything larger than 4 GB over the web!