admin管理员组文章数量:1414908
I am using GlassFish 7 (version 7.0.21) with JDK 17 (jdk-17.0.11+9) to deploy a Jakarta EE application generated using Jakarta EE Starter.
I encountered an issue where URLs containing non-ASCII characters (e.g., Chinese characters) return different responses depending on the HTTP version:
- HTTP/1.1: /%E6%B8%AC%E8%A9%A6 → returns 200 (works fine)
- HTTP/2.0: /%E6%B8%AC%E8%A9%A6 → returns 404 (not found) The issue only occurs under HTTPS (HTTP/2.0). When using HTTP (HTTP/1.1), the request works correctly.
In access.log GET correctly sends the URL in UTF-8 encoding.
Verified that the client correctly sends the URL in UTF-8 encoding. Use Glassfish access log
The request structure is identical except for the HTTP version. Tested with Different Clients
The issue occurs consistently across multiple browsers (Chrome, Firefox) and curl. Example curl command that works:
- curl -k -v --http1.1 "/%E6%B8%AC%E8%A9%A6"
Example curl command that fails (404):
- curl -k -v --http2 "/%E6%B8%AC%E8%A9%A6"
Expected Feedback
- Has anyone encountered a similar issue with GlassFish 7 and HTTP/2.0?
- Could this be a bug in GlassFish 7’s handling of non-ASCII characters in HTTP/2.0?
- Are there any workarounds or additional configurations I can apply to fix this?
- Should I modify GlassFish settings or Jakarta EE application settings to ensure proper URL encoding under HTTP/2.0?
本文标签:
版权声明:本文标题:http2 - GlassFish 7 (7.0.21) + JDK 17: URL with Non-ASCII Characters Returns 404 in HTTP2.0 but 200 in HTTP1.1 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745172235a2646045.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论