diff options
author | Ian Price <ianprice90@googlemail.com> | 2012-05-08 00:18:59 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-07-06 22:18:13 +0200 |
commit | 64ead01db7d5110e94be5d6d984aaa8ead4e5e8c (patch) | |
tree | c93fe0891e45a8c67f4ad77ba55f30ed0bbd13a3 | |
parent | 312e79f8d5bc5a70fccb0dc8b13260acf688493b (diff) | |
download | guile-64ead01db7d5110e94be5d6d984aaa8ead4e5e8c.tar.gz |
Document and export `declare-opaque-header!'
* module/web/http.scm (declare-opaque-header!): Add docstring. New export.
* doc/ref/web.texi (HTTP): Add documentation.
-rw-r--r-- | doc/ref/web.texi | 5 | ||||
-rw-r--r-- | module/web/http.scm | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/ref/web.texi b/doc/ref/web.texi index d4eec1021..2051979f3 100644 --- a/doc/ref/web.texi +++ b/doc/ref/web.texi @@ -398,6 +398,11 @@ HTTP stack like this: (display (inet-ntoa ip) port))) @end example +@deffn {Scheme Procedure} declare-opaque-header! name +A specialised version of @code{declare-header!} for the case in which +you want a header's value to be returned/written ``as-is''. +@end deffn + @deffn {Scheme Procedure} valid-header? sym val Return a true value iff @var{val} is a valid Scheme value for the header with name @var{sym}. diff --git a/module/web/http.scm b/module/web/http.scm index 9232b281e..cc5dd5a4b 100644 --- a/module/web/http.scm +++ b/module/web/http.scm @@ -42,6 +42,7 @@ header->string declare-header! + declare-opaque-header! known-header? header-parser header-validator @@ -1145,6 +1146,8 @@ phrase\"." ;; emacs: (put 'declare-header! 'scheme-indent-function 1) ;; emacs: (put 'declare-opaque!-header 'scheme-indent-function 1) (define (declare-opaque-header! name) + "Declares a given header as \"opaque\", meaning that its value is not +treated specially, and is just returned as a plain string." (declare-header! name parse-opaque-string validate-opaque-string write-opaque-string)) |