Skip to content

Fix/http method validation

Choose a tag to compare

@hempe hempe released this 02 Sep 06:39
· 10 commits to master since this release
aad59d4
Fix/http method validation (#12)

* Improve HTTP method validation and error responses

- Add proper HTTP method validation for WebSocket handshakes (return 405 for non-GET)
- Add Connection header validation for WebSocket handshakes (return 400 for missing/invalid)
- Add GET method validation to FileResponse methods (return 405 for non-GET)
- Remove unused ValidateWebSocketHandshakeRequest method
- Replace exception throwing with proper HTTP error responses

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add extension methods and update demo to use new file response methods

- Add CreateFileResponse and CreateEmbeddedResourceResponse extension methods
- Update demo server to use new extension methods with proper validation
- Minor formatting improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>