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

Allow request entity-body related errors after 412 Precondition Failed testing #261

Closed
awwright opened this issue Oct 23, 2019 · 0 comments · Fixed by #440
Closed

Allow request entity-body related errors after 412 Precondition Failed testing #261

awwright opened this issue Oct 23, 2019 · 0 comments · Fixed by #440

Comments

@awwright
Copy link

RFC 7232 HTTP Conditional Requests reads:

A server MUST ignore all received preconditions if its response to the same request without those conditions would have been a status code other than a 2xx (Successful) or 412 (Precondition Failed). In other words, redirects and failures take precedence over the evaluation of preconditions in conditional requests.

This seems to have the effect that 412 cannot happen as part of a 100-continue response, but instead, the entire upload body must be parsed for errors (such as 422 Unprocessable Entity), and only if it is free of errors can the server return 412 (Precondition Failed).

This seems unnecessary and wasteful of bandwidth, and perhaps a result of the fact that server-side validation of documents, including the 422 Unprocessable Entity status code, is a comparatively newer feature of HTTP servers. [1]

If this is the case, consider relaxing this requirement so that 412 (Precondition Failed) is the last error tested before the request body is parsed.

[1] See mailing list thread: https://lists.w3.org/Archives/Public/ietf-http-wg/2019OctDec/0031.html

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.

3 participants