Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[BUG] A request the HTTP Listener rejects leaves no record anywhere

未关闭
#480 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java

调研方向

Start in the HTTP Listener receiver, HttpReceiver, where the existing ErrorEvent dispatch sites are, and read the Jetty hook HttpChannel.Listener.onRequestFailure that the issue identifies as the only one reporting rejected requests. Reproduce with the curl command in the issue (431 with a 9000-byte header) and check the Events tab and logs/mirth.log. Done means a rejected request produces an Events entry naming the listener, and ideally the 400 and 414 cases are covered too; conf/log4j2.properties is also involved in the logging side. The issue leaves the event design open, so confirm the approach with maintainers first.

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

描述

bug

Describe the bug
This is the HTTP Listener source connector. When the Jetty server it runs rejects a request before the channel sees it, nothing is recorded: no message, no event, nothing in mirth.log. Same for a header that is too large (431), a URI that is too long (414) and a malformed header (400). Reproducible every time.

To Reproduce

  1. Deploy an HTTP Listener with the default Request Header Size (8192).
  2. curl -H "X-Big: $(head -c 9000 /dev/zero | tr '\0' a)" http://localhost:<port>/
  3. The client gets 431 Request Header Fields Too Large.
  4. Look at the dashboard, the Events tab and logs/mirth.log.

Expected behavior
An operator can see that the listener turned a request away, and why.

Actual behavior
Nothing anywhere. No event is written. Jetty logs a WARN, but conf/log4j2.properties sets rootLogger = ERROR with no Jetty logger, so the line is dropped.

Environment
OIE 4.6.0 (Linux tarball), OpenJDK 17.0.20.1, Jetty 9.4.57. main has the same Jetty version and the same log4j2.properties root logger.

Workaround(s)
Add to conf/log4j2.properties and restart:

logger.jettyParser.name = org.eclipse.jetty.http.HttpParser
logger.jettyParser.level = WARN

A 431 then writes WARN ... org.eclipse.jetty.http.HttpParser: Header is too large 8193>8192 to mirth.log, and a 414 writes URI is too large >8192. The line names no channel, port or client, a 400 for a malformed header still logs nothing, and there is still no event.

Additional context
Which Jetty hooks see a rejected request, checked on 9.4.57:

  • HttpChannel.Listener.onRequestFailure fires with BadMessageException: 431 (register with connector.addBean(...)). It is the only one that reports the failure.
  • ErrorHandler.handle never fires on this path.
  • RequestLog.log, onResponseBegin and onComplete fire but report status 200, so a request log would record the rejection as a success.

HttpReceiver already dispatches ErrorEvents at four sites, so an Events entry from onRequestFailure would fit. Jetty throws BadMessageException for the 400 and 414 cases too, so the same hook should cover them (not tested).

主要语言
Java
星标
227
派生
81
平均合并
3 天 6 小时
30 天内合并 PR
15

环境准备

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

从这里开始

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

OpenIntegrationEngine/engine 的其他 Issue

查看 OpenIntegrationEngine/engine 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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