Improves attachment download headers and security