Jeremiah Lowin Copilot commited on
Commit
fe933f9
·
unverified ·
1 Parent(s): 710a8fe

Update src/fastmcp/server/dependencies.py

Browse files

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Files changed (1) hide show
  1. src/fastmcp/server/dependencies.py +2 -4
src/fastmcp/server/dependencies.py CHANGED
@@ -63,10 +63,8 @@ def get_http_headers(include_all: bool = False) -> dict[str, str]:
63
  "proxy-connection",
64
  }
65
  # (just in case)
66
- assert all(h.lower() == h for h in exclude_headers), (
67
- "Excluded headers must be lowercase"
68
- )
69
-
70
  headers = {}
71
 
72
  try:
 
63
  "proxy-connection",
64
  }
65
  # (just in case)
66
+ if not all(h.lower() == h for h in exclude_headers):
67
+ raise ValueError("Excluded headers must be lowercase")
 
 
68
  headers = {}
69
 
70
  try: