(update-header resp header-name f & args)
Looks up a header in a Ring response (or request) case insensitively,
then updates the header with the supplied function and arguments in the
manner of update-in.
Source
(defn update-header
"Looks up a header in a Ring response (or request) case insensitively,
then updates the header with the supplied function and arguments in the
manner of update-in."
{:added "1.4"}
[resp header-name f & args]
(let [header-key (or (some-> resp (find-header header-name) key) header-name)]
(update-in resp [:headers header-key] #(apply f % args))))