add content length of 0 on redirect
use faster read for known small files
move constants up, so they don't trigger an undefined warning