Atom Feed SITE FEED   ADD TO GOOGLE READER

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?
  • Via SMB? Nope. I've had very little success with SMB in the past, and I think it's slow
  • Via FTP? Nope. The Windows FTP command sucks wind.
  • Via HTTP? Sure! My Mac has Apache built-in, and then I can download with my browser. This combination might even support resume if the transfer is interrupted.

    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!