You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
RFC 7232 HTTP Conditional Requests reads:
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
The text was updated successfully, but these errors were encountered: