Better example for setting header fields in documentation
|Reported by:||bbjay||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I think the current example for setting header fields in HttpResponse objects is a bit unfortunate:
The Cache-Control field (also the Vary field) is a comma-separated multi value field.
Cache-Control: public, max-age=60
Setting its value by a dictionary access can unintentionally remove other present values, e.g. set by another middleware.
My proposed solution: change example to use 'Age' header field, mention and encourage use of patch_vary_header and patch_cache_control methods.