manpagez: man pages & more
info guile
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.3.4.3 Entity Headers

Entity headers may be present in any HTTP message, and refer to the resource referenced in the HTTP request or response.

HTTP Header: List allow

A list of allowed methods on a given resource, as symbols.

(parse-header 'allow "GET, HEAD")
⇒ (GET HEAD)
HTTP Header: List content-encoding

A list of content codings, as symbols.

(parse-header 'content-encoding "gzip")
⇒ (gzip)
HTTP Header: List content-language

The languages that a resource is in, as strings.

(parse-header 'content-language "en")
⇒ ("en")
HTTP Header: UInt content-length

The number of bytes in a resource, as an exact, non-negative integer.

(parse-header 'content-length "300")
⇒ 300
HTTP Header: URI content-location

The canonical URI for a resource, in the case that it is also accessible from a different URI.

(parse-header 'content-location "http://example.com/foo")
⇒ #<<uri> ...>
HTTP Header: String content-md5

The MD5 digest of a resource.

(parse-header 'content-md5 "ffaea1a79810785575e29e2bd45e2fa5")
⇒ "ffaea1a79810785575e29e2bd45e2fa5"
HTTP Header: List content-range

A range specification, as a list of three elements: the symbol bytes, either the symbol * or a pair of integers, indicating the byte rage, and either * or an integer, for the instance length. Used to indicate that a response only includes part of a resource.

(parse-header 'content-range "bytes 10-20/*")
⇒ (bytes (10 . 20) *)
HTTP Header: List content-type

The MIME type of a resource, as a symbol, along with any parameters.

(parse-header 'content-length "text/plain")
⇒ (text/plain)
(parse-header 'content-length "text/plain;charset=utf-8")
⇒ (text/plain (charset . "utf-8"))

Note that the charset parameter is something is a misnomer, and the HTTP specification admits this. It specifies the encoding of the characters, not the character set.

HTTP Header: Date expires

The date/time after which the resource given in a response is considered stale.

(parse-header 'expires "Tue, 15 Nov 1994 08:12:31 GMT")
⇒ #<date ...>
HTTP Header: Date last-modified

The date/time on which the resource given in a response was last modified.

(parse-header 'expires "Tue, 15 Nov 1994 08:12:31 GMT")
⇒ #<date ...>

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 20, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.