fix: remove MIME type validation from MCPServer Resource (#2235)

This commit is contained in:
Max Isbey 2026-03-06 14:50:58 +00:00 • committed by GitHub
commit 92f1b1500d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,6 +91,14 @@ class TestResourceValidation:
)
assert resource.mime_type == "application/json"
# RFC 2045 quoted parameter value (gh-1756)
resource = FunctionResource(
uri="resource://test",
fn=dummy_func,
mime_type='text/plain; charset="utf-8"',
)
assert resource.mime_type == 'text/plain; charset="utf-8"'
@pytest.mark.anyio
async def test_resource_read_abstract(self):
"""Test that Resource.read() is abstract."""