Tag: 亚马逊 ECH

HTTP标头不在EC2上返回

我在2个EC2实例(分段和生产环境)上部署了一个Spring Boot应用程序。 我有一个用于下载文件的端点。 它看起来像这样(应用程序是用Kotlin编写的): @PostMapping("/download") open fun download(@RequestBody request: DownloadRequest, servletResponse: HttpServletResponse) { val file = getByteArray(request.fileId) servletResponse.outputStream.write(file) servletResponse.contentType = MediaType.APPLICATION_OCTET_STREAM_VALUE servletResponse.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"${request.fileId}.zip\"") } 当我在登台机器上执行下载请求时,一切都很好。 我找回文件,响应中设置了标题。 这些是我可以在邮差看到的标题: Cache-Control →no-cache, no-store, max-age=0, must-revalidate Connection →keep-alive Content-Disposition →attachment; filename="345412.zip" Content-Length →11756 Content-Type →application/octet-stream Date →Tue, 04 Apr 2017 09:04:19 GMT Expires →0 Pragma →no-cache X-Application-Context →application:8081 […]