Skip to content

Enhance middleware resilience and optimize HTTP/3 handling to use context_agent as mcp_server#131

Open
pledou wants to merge 7 commits intonextcloud:mainfrom
pledou:main
Open

Enhance middleware resilience and optimize HTTP/3 handling to use context_agent as mcp_server#131
pledou wants to merge 7 commits intonextcloud:mainfrom
pledou:main

Conversation

@pledou
Copy link
Copy Markdown

@pledou pledou commented Mar 17, 2026

This pull request updates the Nextcloud integration in the ex_app/lib/mcp_server.py file to patch the HTTP3 adapter..

Nextcloud Adapter and HTTP3 Handling

  • Added a _patch_disable_http3 function that monkey-patches the Nextcloud session adapters (NcSessionApp and AsyncNcSessionApp) to always disable HTTP3, improving compatibility with certain server configurations. This patch is applied at import time.

@janepie
Copy link
Copy Markdown
Member

janepie commented Mar 17, 2026

Hey @pledou, can you please explain why you think these changes are necessary? Please also don't add unnecessary whitespaces, it makes the diff a bit unreadable.

@pledou
Copy link
Copy Markdown
Author

pledou commented Mar 17, 2026

My goal was to use OpenWebui to call context_agent as MCP tool. I had also to disable http3 because both nextcloud and OpenWebui are under Traefik reverse proxy with HTTP3 activated: It is a fast patch to make it work without retrograding the full stack in HTTP2. I did these changes weeks ago. I have to review the other change concerning NextcloudApp instead of AsyncNextcloudApp to add logs before-after and if necessary rollback this change

@pledou
Copy link
Copy Markdown
Author

pledou commented Mar 18, 2026

@janepie, apologies for the noises. I have double checked today that the change in UserAuthMiddleware could add robustness but is absolutely not necessary, so I have removed it in order to focus on the HTTP3 workaround.

pledou added 7 commits March 18, 2026 11:01
Signed-off-by: Pierre Leduc <p.leduc@etik.com>
…data

Signed-off-by: Pierre Leduc <p.leduc@etik.com>
Signed-off-by: Pierre Leduc <p.leduc@etik.com>
Signed-off-by: Pierre Leduc <p.leduc@etik.com>
Signed-off-by: Pierre Leduc <p.leduc@etik.com>
… function definition formatting

Signed-off-by: Pierre Leduc <p.leduc@etik.com>
Signed-off-by: Pierre Leduc <p.leduc@etik.com>
@janepie
Copy link
Copy Markdown
Member

janepie commented Mar 18, 2026

Thanks for the cleanup!
I still don't really get why you think this is necessary, disabling HTTP3 in general is not something we want to do. Can you describe your issue with HTTP3 a bit in detail?

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.

2 participants