Changeset 33953 in project


Ignore:
Timestamp:
04/08/17 17:35:32 (2 weeks ago)
Author:
sjamaan
Message:

update intarweb docs to mention new "raw" header values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/intarweb

    r33947 r33953  
    381381to a header value by wrapping the value in a vector of length 2. The
    382382first entry in the vector is the header value, the second is an alist
    383 of attribute name/value pairs.
     383of attribute name/value pairs, or the symbol {{raw}}, in which case
     384the header value will be kept as-is when writing the response.
    384385
    385386<procedure>(headers->list HEADERS) => ALIST</procedure>
     
    408409only one header.  An empty list is returned if the header does not exist.
    409410
     411If the header is a "raw" one, the symbol {{raw}} is returned.
     412
    410413<procedure>(header-param PARAM NAME HEADERS [DEFAULT]) => value</procedure>
    411414
    412 This will return a specific parameter for the header, or DEFAULT
     415This will return a specific parameter for the header, or {{DEFAULT}}
    413416if the parameter isn't present or the header does not exist.  This
    414417also assumes there's only one header.
     418
     419If the header is a raw one, {{DEFAULT}} will be returned.
    415420
    416421<procedure>(header-contents NAME HEADERS) => LIST</procedure><br>
     
    756761</table>
    757762
    758 Any unrecognised headers are assumed to be multi-headers, and the
    759 entire header lines are put unparsed into a list, one entry per line.
     763Any unrecognised headers are assumed to be **raw** multi-headers, and
     764the entire header lines are put unparsed into a list, one entry per
     765line.
    760766
    761767
     
    821827a multi-header, and act as a simple replace in the case of a
    822828single-header.
     829
     830If you attempt to add a header that's not a proper 2-element vector,
     831or if you try to combine raw and non-raw header values, this will
     832raise an exception of type {{(exn http header-value)}}.
    823833
    824834<parameter>(single-headers [LIST])</parameter>
     
    10661076=== Changelog
    10671077
    1068 * trunk - Improve handling of errors while unparsing by showing which header failed, with its value (and the original exception message).
     1078* trunk - Improve handling of errors while unparsing by showing which header failed, with its value (and the original exception message).  Add support for {{raw}} encoding (thanks to Kooda for pointing out the necessity of this).
    10691079* 1.6.1 - Default {{request-has-message-body?}} returns {{#t}} for HTTP/1.0 non-keepalive connections.
    10701080* 1.6 - Various performance improvements, and support for chunked requests (rather than just responses).
Note: See TracChangeset for help on using the changeset viewer.