some http fixes (support open-ended range requests and make attachment optional when requesting files)