Hi guys, I have a question regarding ETags. I adde...
# ktor
l
Hi guys, I have a question regarding ETags. I added the ConditionalHeaders feature, but I don't understand how it is supposed to work. From what I read in the class, it reads LastModified and ETag headers provided in the request and determines if a 304 must be returned or not. What I don't understand is to what the provided ETag is compared to. Where should I tell Ktor that this resources corresponds to this ETag ? Thanks
I tried to add
call.response.etag(etag)
to my endpoint thinking that the ConditionalHeaders feature would pick up the ETag from the response and compare it with the If-None-Match from the request. But the response header is not retrieved (as if it is set too late in the pipeline ?)
Is it linked to this issue from @cy ? https://github.com/ktorio/ktor/issues/697