Sofa.Cushion (sofa v0.1.3)
View SourceInternal Helpers for Sofa, with a vanity naming convention.
If the only tool you have is CouchDB, everything is very uncomfortable without a Cushion.
Summary
Functions
Sanitise HTTP headers into ones we trust and format, and drop the rest. This is necessary because proxies, clients, HTTP1* and HTTP2 all disagree about whether headers should be upper, lower, camel, snake, or wtf case.
Functions
@spec untaint_headers(Tesla.Env.headers()) :: map()
Sanitise HTTP headers into ones we trust and format, and drop the rest. This is necessary because proxies, clients, HTTP1* and HTTP2 all disagree about whether headers should be upper, lower, camel, snake, or wtf case.
Server : CouchDB/3.1.1 (Erlang OTP/22)
X-Couch-Request-Id : f5b74b7038
X-Couchdb-Body-Time : 0
Cache-Control : must-revalidate
Content-Length : 443
Content-Type : application/json
Date : Sun, 25 Apr 2021 18:43:36 GMT
Etag : "4-322add00c33cab838bf9d7909f18d4f5"