You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/05/24 11:10:41 UTC
[PR] fix: recover HTTP/2 handler errors as 500 [pekko-http]
He-Pin opened a new pull request, #1041:
URL: https://github.com/apache/pekko-http/pull/1041
Motivation:
Port the upstream Akka HTTP fix for recovering HTTP/2 handler failures into 500 responses. The upstream commit is https://github.com/akka/akka-http/commit/02bb9872e1d391f53e21b663336e5052085a0b8c, which is now Apache licensed.
Modification:
- Wrap HTTP/2 request handlers so failed futures and synchronous NonFatal throws become `500 InternalServerError` responses.
- Keep HTTP/1 fallback requests on the original handler so existing HTTP/1 error classification is preserved.
- Reject unknown HTTP/2 pseudo-headers during request parsing so protocol errors remain HTTP/2 protocol errors instead of being converted to 500 responses.
- Add HTTP/2 regression coverage for failed futures and synchronous handler throws.
Result:
HTTP/2 user handler failures now return 500 responses without breaking the connection, while malformed HTTP/2 pseudo-headers still produce protocol errors as required by h2spec.
References:
- Upstream: https://github.com/akka/akka-http/commit/02bb9872e1d391f53e21b663336e5052085a0b8c
- Source range: https://github.com/akka/akka-http/compare/v10.2.6...v10.5.2
Validation:
- `git diff --check`
- `sbt 'http-core / scalafmtCheck' 'http2-tests / scalafmtCheck' 'http2-tests / Test / testOnly org.apache.pekko.http.impl.engine.http2.Http2ClientServerSpec org.apache.pekko.http.impl.engine.http2.H2SpecIntegrationSpec'`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: recover HTTP/2 handler errors as 500 [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1041:
URL: https://github.com/apache/pekko-http/pull/1041#issuecomment-4528584719
https://github.com/akka/akka-http/pull/4242
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: recover HTTP/2 handler errors as 500 [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1041:
URL: https://github.com/apache/pekko-http/pull/1041#issuecomment-4528587560
Copilot summarises the diff with #1017 as
* Wraps HTTP/2 handlers with error recovery but also rejects unknown HTTP/2 pseudo-headers during request parsing
* Preserves the original HTTP/1 error classification for HTTP/1 fallback
* Distinguishes between handler failures (→ 500) and protocol errors (→ HTTP/2 protocol errors)
These all sound like good things to have
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: recover HTTP/2 handler errors as 500 [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1041:
URL: https://github.com/apache/pekko-http/pull/1041#issuecomment-4528568647
duplicate of #1017 which breaks some tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] fix: recover HTTP/2 handler errors as 500 [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #1041:
URL: https://github.com/apache/pekko-http/pull/1041
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org