question

MalcolmCrowe-1455 avatar image
0 Votes"
MalcolmCrowe-1455 asked vb2ae answered

When will .NET support RFC 7232 for ETag?

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://docs.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?

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

vb2ae avatar image
0 Votes"
vb2ae answered

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

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.