Response headers are returned by the server when sending back content and include a number of different header fields, many of which are standard HTTP response header and have no significance to CouchDB operation. The list of response headers important to CouchDB are listed below.
Content-type
Specifies the MIME type of the returned data. For most
request, the returned MIME type is
text/plain
. All text is encoded in
Unicode (UTF-8), and this is explicitly stated in the
returned Content-type
, as
text/plain;charset=utf-8
.
Cache-control
The cache control HTTP response header provides a suggestion
for client caching mechanisms on how to treat the returned
information. CouchDB typically returns the
must-revalidate
, which indicates that the
information should be revalidated if possible. This is used
to ensure that the dynamic nature of the content is
correctly updated.
Content-length
The length (in bytes) of the returned content.
Etag
The Etag
HTTP header field is used to
show the revision for a document.