Skip to content
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

sf: (potentially) clarify strict error handling #2399

Closed
reschke opened this issue Feb 4, 2023 · 2 comments · Fixed by #2404
Closed

sf: (potentially) clarify strict error handling #2399

reschke opened this issue Feb 4, 2023 · 2 comments · Fixed by #2404

Comments

@reschke
Copy link
Contributor

reschke commented Feb 4, 2023

https://httpwg.org/http-extensions/draft-ietf-httpbis-sfbis.html#section-2

When parsing fails, the entire field is ignored (see Section 4.2); in most situations, violating field-specific constraints should have the same effect. Thus, if a header is defined as an Item and required to be an Integer, but a String is received, the field will by default be ignored. If the field requires different error handling, this should be explicitly specified.

It appears that some read the last sentence:

If the field requires different error handling, this should be explicitly specified.

as saying that the generic draconian handling of parsing errors can be relaxed.

@mnot
Copy link
Member

mnot commented Feb 6, 2023

It's saying that a generic parser will fail, but the field-specific handling of that failure might do somthing else, including try to parse the field using an alternative method. SF cannot constrain what a field does with the output of parsing.

@reschke
Copy link
Contributor Author

reschke commented Feb 6, 2023

That sounds like "we require draconian error handling, but if there's an error, you are free to do something else".

Of course we can't force anybody not to do that, but we should be clear that this is not what the spec says.

mnot added a commit that referenced this issue Feb 7, 2023
@mnot mnot removed the editorial label Feb 26, 2023
@mnot mnot closed this as completed in #2404 Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants