char-set:blank = LWS from RFC 2616 (after folding)
This commit is contained in:
parent
ffac0ebcac
commit
35565068fb
|
@ -73,7 +73,6 @@
|
||||||
(cond ((assq tag headers) => cdr)
|
(cond ((assq tag headers) => cdr)
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
|
||||||
|
|
||||||
;; GET-NUMERIC-FIELD-VALUE
|
;; GET-NUMERIC-FIELD-VALUE
|
||||||
;; generalized function to get a field value of the form 1*DIGIT
|
;; generalized function to get a field value of the form 1*DIGIT
|
||||||
;; req is a request record, field-name a symbol
|
;; req is a request record, field-name a symbol
|
||||||
|
@ -90,7 +89,7 @@
|
||||||
((field-content (get-header (request-headers req) field-name)))
|
((field-content (get-header (request-headers req) field-name)))
|
||||||
(if field-content ;; request contained "field-name" header
|
(if field-content ;; request contained "field-name" header
|
||||||
(let ;;see * below
|
(let ;;see * below
|
||||||
((field-value (string->number (string-trim-both field-content char-set:whitespace)))) ;;char-set:whitespace = LWS from RFC2616?
|
((field-value (string->number (string-trim-both field-content char-set:blank)))) ;;char-set:blank = Space + Tab = LWS from RFC2616 after folding
|
||||||
(if (and (integer? field-value) (>= field-value 0)) ;;yes, field value contained only digits, and at least one digit.
|
(if (and (integer? field-value) (>= field-value 0)) ;;yes, field value contained only digits, and at least one digit.
|
||||||
field-value
|
field-value
|
||||||
(http-error
|
(http-error
|
||||||
|
|
Loading…
Reference in New Issue