Check if method is valid token with conventional restrictions.
(self, method)
| 797 | return False |
| 798 | |
| 799 | def _is_valid_method(self, method): |
| 800 | """Check if method is valid token with conventional restrictions.""" |
| 801 | if not method: |
| 802 | return False |
| 803 | # Check length (3-20 chars) |
| 804 | if not 3 <= len(method) <= 20: |
| 805 | return False |
| 806 | # Check for lowercase or # (unconventional) |
| 807 | for c in method: |
| 808 | if c in b'abcdefghijklmnopqrstuvwxyz#': |
| 809 | return False |
| 810 | return self._is_valid_token(method) |
| 811 | |
| 812 | def _is_valid_token(self, data): |
| 813 | """Check if data contains only RFC 9110 token characters.""" |
no test coverage detected