Skip to content

Remove HTTP2 details from generic types shared by HTTP/1.1#7482

Merged
achamayou merged 1 commit intomicrosoft:mainfrom
eddyashton:simplify_http_responder
Nov 25, 2025
Merged

Remove HTTP2 details from generic types shared by HTTP/1.1#7482
achamayou merged 1 commit intomicrosoft:mainfrom
eddyashton:simplify_http_responder

Conversation

@eddyashton
Copy link
Copy Markdown
Member

Trying to simplify these interfaces to make it easier to add blocking commit, noticed 2 redundancies:

  • The HTTPResponder type has stream-specific virtual methods, that are unused. I think these should remain in the HTTP2 inheritance stack, visible only to HTTP2-aware bits of code.
  • The per-stream responders were needlessly (afaict) stored in the parent RPCSessions object, even though they're keyed per-sessionID. That seems daft, they can be pushed down the stack into HTTP2ServerSession, simplifying their lifetime and lookup.

Copilot AI review requested due to automatic review settings November 25, 2025 14:56
@eddyashton eddyashton requested a review from a team as a code owner November 25, 2025 14:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors HTTP/2-specific functionality out of generic HTTP types to simplify the codebase and better separate concerns between HTTP/1.1 and HTTP/2 implementations.

  • Removes HTTP/2-specific streaming methods from the generic HTTPResponder interface
  • Moves per-stream responder storage from the global RPCSessions class into HTTP2ServerSession, where it belongs
  • Eliminates unnecessary cross-session synchronization by localizing responder lifetime to individual HTTP/2 sessions

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/http/responder_lookup.h Deleted - global responder lookup no longer needed as responders are now session-local
src/http/http_session.h Removed HTTP/2 stream methods that threw std::logic_error from HTTP/1.1 responder
src/http/http2_types.h Removed dependency on http_responder.h, defined StreamCloseCB locally
src/http/http2_session.h Moved responder storage into HTTP2ServerSession, removed override keywords from HTTP/2-specific methods, removed global lookup reference
src/enclave/rpc_sessions.h Removed ResponderLookup inheritance and updated constructor calls to remove responder lookup parameter
include/ccf/http_responder.h Removed HTTP/2-specific streaming virtual methods and callback typedef from generic interface

@achamayou achamayou merged commit 959a3e1 into microsoft:main Nov 25, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants