-
Notifications
You must be signed in to change notification settings - Fork 5
Enforce header entity length in grammar #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Enforce header entity length in grammar #15
Conversation
Doesn't work so simple, have to take another look
for
|
Some things are easier when you do them not in the grammar, but on the parsed ast tree. e.g |
126c1d1
to
083f962
Compare
__init__.py
Outdated
observed = header.get(field.upper(), []) | ||
expected = HEADER_FIELDS.get(field)._fields | ||
if len(header.get(field.upper(), [])) != len(expected): | ||
raise HeaderFieldError(field.upper(), len(observed), len(expected)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to really raise an exception and terminate or wait for potentially additional errors?
No description provided.