java - 当 Spring Boot 应用程序托管在远程 VM 中时,“Accept-Ranges”标头设置为“none”。在本地托管时设置为“字节”
问题描述
我有一个 Spring Boot 应用程序,它需要服务范围请求以恢复下载。当此 Spring Boot 应用程序托管在本地 Windows 机器中并且“Accept-Ranges”标头默认设置为“bytes”时,一切正常。但是,当相同的应用程序托管在运行 Windows 的远程虚拟机中时,“Accept-Ranges”标头默认设置为“none”,并且无法恢复下载。这里可能是什么问题?
>curl -I http://localhost:8080
HTTP/1.1 200
Accept-Ranges: bytes
Content-Type: application/json
Content-Length: 36121548
Date: Tue, 14 Sep 2021 13:00:19 GMT
>curl -I http://{IPofRemoteVM}:8080
HTTP/1.1 200
Accept-Ranges: none
Content-Type: application/json
Content-Length: 36121548
Date: Tue, 14 Sep 2021 13:00:23 GMT
解决方案
推荐阅读
- c# - 从按钮c#VB.FORM将行添加到gridview
- c# - 使用 NEST 索引大型 JSON
- c++ - C++ 向量 push_back 空大括号
- outlook - OWA 自动完成缓存位置
- c++ - 从另一个嵌套类 (C++) 访问嵌套类成员
- python - cmd中的可编辑终端边框
- c++ - 尝试使用 wininet 将文件上传到 FTP 时遇到问题 [Id 返回 1 退出状态]
- square - 将 wix 网站重定向到新网站
- haskell - Haskell 语言服务器并转到库资源
- colors - Greasemonkey 编码查询:更改文本颜色/样式和/或使自定义背景图像更亮/更透明?