TODO: don't actually pass through files with fpassthru() but collect necessary stats for header information. Also beautify handler configuration and Factory.