suyanhanx commented on issue #2091: URL: https://github.com/apache/incubator-opendal/issues/2091#issuecomment-1519095074
> I think we should return `PreconditionFailed` error as indicated by it's meaning:= This is a header for cache control. 🤔 https://www.rfc-editor.org/rfc/rfc7232#section-3.2 `If-Match` and `If-None-Match` are HTTP request headers that allow clients to perform conditional requests based on the version of a resource on the server. The main difference between the two headers is in the way they are used and the expected behavior of the server in response to the headers. The `If-Match` header is used to perform a conditional request based on the resource's current version on the server. When a client sends an HTTP request with the If-Match header, the server will only perform the requested operation if the current version of the resource on the server matches the version specified in the header. If the versions do not match, the server will return an HTTP `412 Precondition Failed` response. On the other hand, the `If-None-Match` header is used to perform a conditional request based on the resource's version on the server compared to the version the client has. When a client sends an HTTP request with the `If-None-Match` header, the server will only return the requested resource if the version on the server is different from the version specified in the header. If the versions match, the server will return an HTTP `304 Not Modified` response, indicating that the resource has not been modified since the version specified in the header. In summary, the key difference between `If-Match` and `If-None-Match` is that `If-Match` is used to conditionally perform an operation based on the resource's current version on the server, while `If-None-Match` is used to conditionally retrieve a resource based on the version the client has compared to the version on the server. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
