Skip to content

fix(mcp): pat bearer header column parsing#65

Merged
ChrisCoder9000 merged 1 commit into
mainfrom
development
Apr 26, 2026
Merged

fix(mcp): pat bearer header column parsing#65
ChrisCoder9000 merged 1 commit into
mainfrom
development

Conversation

@ChrisCoder9000

@ChrisCoder9000 ChrisCoder9000 commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores

    • Version updated to 2.11.12-dev
  • Bug Fixes

    • Improved Authorization header normalization for Bearer token authentication to ensure consistent handling across the system

@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f1e3d1f1-d071-4c68-90c2-7327450f7639

📥 Commits

Reviewing files that changed from the base of the PR and between f593be2 and 9d42a0d.

📒 Files selected for processing (3)
  • README.md
  • pyproject.toml
  • src/services/mcp/app.py

📝 Walkthrough

Walkthrough

Version number incremented from 2.11.11-dev to 2.11.12-dev across README badge and pyproject.toml. AuthContextMiddleware enhanced to normalize Authorization headers by extracting bearer tokens, removing existing authorization entries from raw_headers, and appending a standardized header to ASGI scope.

Changes

Cohort / File(s) Summary
Version Update
README.md, pyproject.toml
Version badges and package version bumped from 2.11.11-dev to 2.11.12-dev.
Middleware Enhancement
src/services/mcp/app.py
AuthContextMiddleware now normalizes Authorization: Bearer <token> format by rebuilding raw_headers, removing duplicate authorization entries, and updating ASGI scope with standardized header.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A hop, a skip—the version's blessed anew,
From 2.11.11 to 2.11.12, with headers scrubbed true!
Bearer tokens dance in normalized delight,
As middleware whispers secrets to the scope's sight. ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch development

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Pylint (4.0.5)
src/services/mcp/app.py

************* Module .pylintrc
.pylintrc:1:0: F0011: error while parsing the configuration: Source contains parsing errors: '.pylintrc'
[line 18]: 'C0103' (config-parse-error)
[
{
"type": "convention",
"module": "src.services.mcp.app",
"obj": "",
"line": 45,
"column": 0,
"endLine": null,
"endColumn": null,
"path": "src/services/mcp/app.py",
"symbol": "line-too-long",
"message": "Line too long (113/100)",
"message-id": "C0301"
},
{
"type": "convention",
"module": "src.services.mcp.app",
"obj": "",
"line": 51,
"column": 0,
"endLine": null,
"endColumn": null,
"path": "src/services/mcp/app.py",
"symbol": "line-too-long",
"message": "Line too long (115/100)",
"message-id": "C0301"
},
{
"type": "convention",
"module": "src.services.mcp.app",
"obj": "",
"line": 1,

... [truncated 6418 characters] ...

ne": 15,
"endColumn": 42,
"path": "src/services/mcp/app.py",
"symbol": "wrong-import-order",
"message": "standard import "contextlib.asynccontextmanager" should be placed before third party imports "dotenv", "starlette.applications.Starlette", "starlette.middleware.Middleware", "starlette.responses.JSONResponse", "starlette.routing.Mount"",
"message-id": "C0411"
},
{
"type": "convention",
"module": "src.services.mcp.app",
"obj": "",
"line": 15,
"column": 0,
"endLine": 15,
"endColumn": 42,
"path": "src/services/mcp/app.py",
"symbol": "ungrouped-imports",
"message": "Imports from package contextlib are not grouped",
"message-id": "C0412"
}
]


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ChrisCoder9000 ChrisCoder9000 merged commit de7d4b8 into main Apr 26, 2026
1 check was pending
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.

1 participant