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

I am using GlassFish 7 (version 7.0.21) with JDK 17 (jdk-17.0.11+9) to deploy a Jakarta EE application

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745172236a4614996.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信