When will .NET support RFC 7232 for ETag?

Malcolm Crowe 1 Reputation point
2022-05-28T06:56:16.98+00:00

At present it appears that the implementation of ETag in System.Net.Http.Headers imposes some restrictions on usage that are unwarranted under RFC 7232. I know it is done for the best of reasons (I love optimistic concurrency control). I have a big server that runs fine with .NET 2.0 and I would like to use .NET 6 or later instead.
But I am unhappy with the following restrictions:
(In https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-odata/c4d715eb-10f6-47fa-9ccc-2ebf926558a6)
"The server MUST NOT include an ETag header in a response to any request performed against a URI that does not identify, as specified in URI Format: Resource Addressing Rules (section 2.2.3), a single entity, properties of an entity, or a Media Resource. In addition, the server MUST NOT include an ETag header if the request URI identifies a single entity whose type is not enabled for optimistic concurrency control. Server response requests performed against URIs that do not return single entities MUST provide concurrency tokens in the response payload for any entities that are enabled for concurrency control."
I get error messages from .NET when my server code tries to add the ETag header that it wants to add.
As I understand RFC 7232 all HTTP servers SHOULD include an ETag on all GET requests. The current restrictions are in violation of RFC 7232.
It is also annpoying that the documentation continually refers to RFC 2616 when this RFC is obsoleted by the RFCs 7230-7237. Will this issue be fixed in a future version of .NET?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,310 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-05-29T09:11:30.173+00:00

    you could add an issue about adding support for RFC 7232 for ETag

    https://github.com/dotnet/runtime/issues

    0 comments No comments