cashews
cashews copied to clipboard
Fix ETag Handling to Conform with HTTP Standard (Add Double Quotes)
Hi @Krukov,
First of all, thank you for the great implementation of your caching mechanism. It really fills an important gap when compared to other libraries available.
I would like to raise an issue regarding the ETag implementation for the FastAPI middleware. It seems that the ETag is being correctly applied and added as a response header, but it doesn't fully adhere to the HTTP ETag standard. Specifically, the ETag is holding the hash without the necessary double quotes.
I’d like to propose an adjustment to ensure the proper handling of the ETag header:
- Strip the double quotes from the incoming header here.
- Add the double quotes when returning the request here.
Let me know your thoughts on this. I’d be happy to create a pull request and submit it for your review.