I'm planning on refactoring all of this code into a separate module. It's a decent amount of overhead, and many sites don't need it as they allow direct downloads to files anyways.
I've merged this in to 7.x-2.x in d438723. I kept it as an explicit merge commit so it's easier to see what should be backported to the 6.x-1.x branch.
I backported and committed this in f47fa04.
Automatically closed -- issue fixed for 2 weeks with no activity.
Drupal is a registered trademark of Dries Buytaert.