Send the desktop client's launch file with a Last-Modified date of any server locale

未关闭 适合新手
#2,012 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java
领域
backend

调研方向

从 /exec?action=Security.generateJnlp 处理器开始,找到响应的 Last-Modified 头是在哪里设置的;用 grep 搜索 generateJnlp 和 Last-Modified。将日期格式化为英语和 GMT 的 RFC 1123 HTTP 日期,而不是使用服务器的默认区域设置。完成意味着启动链接在俄语/白俄罗斯语区域设置下返回有效的英语 GMT 日期,并且在 Tomcat 或端口 7651 上都不会出现标头警告或 500。

由索引模型根据 Issue 内容生成。

描述

Description

The desktop client's launch file, /exec?action=Security.generateJnlp (with or without the p= heap size and VM arguments of a memory limit), carries a Last-Modified header with a date written in the language of the server, not as HTTP requires. On a server whose locale is Russian or Belarusian the header has Cyrillic in it:

Last-Modified: пн, 12 нояб. 1956 10:00:00 GMT
  • Through the web client in Tomcat the file comes with status 200, but Tomcat drops the header and writes a warning with an exception to its log on every download: The HTTP response header [Last-Modified] with value [...] has been removed from the response because it is invalid.
  • From the application server's own HTTP server (port 7651) the request fails with status 500: java.lang.IllegalArgumentException Illegal character found in header.

On other locales the date can have non-ASCII letters too, so whether a launch link fails can depend on the link and the locale.

Reason

A server set up for Russian or Belarusian users gets an error in the log for every desktop client launch, and the 500 on the application server's HTTP server makes the launch link look broken. Java Web Start also loses the date it needs to tell whether the launch file has changed.

Fix

The launch file's Last-Modified header is an HTTP date in English, in GMT, whatever the server's locale is, and every launch link is answered without an error.

主要语言
Java
星标
214
派生
46
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lsfusion/platform 的其他 Issue

查看 lsfusion/platform 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。