Changeset 33951 in project


Ignore:
Timestamp:
04/08/17 17:28:20 (6 months ago)
Author:
sjamaan
Message:

Deal with the possibility of "raw" in header-param

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/intarweb/trunk/header-parsers.scm

    r33950 r33951  
    2626;; Get a specific parameter of a header, assuming it has only one value
    2727(define (header-param param-name header-name headers #!optional default)
    28   (cond ((assq param-name (header-params header-name headers)) => cdr)
    29         (else default)))
     28  (let ((params (header-params header-name headers)))
     29    (cond ((not (pair? params)) default)
     30          ((assq param-name params) => cdr)
     31          (else default))))
    3032
    3133;; Get the value from one header entry
Note: See TracChangeset for help on using the changeset viewer.