diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-19 21:51:39 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-19 21:51:39 +0100 |
commit | 0efb4d6599625813479b0d280e12ae614b0dadd4 (patch) | |
tree | 959ffb92bb520b99624039e31bc71147682343a7 | |
parent | ffa16d2022a4ff058dace836f5e0a4fc94f64db7 (diff) |
Make the “lang” parameter override the characteristics precedence list rather than augmenting it.
-rw-r--r-- | mulkcms.lisp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp index 802fbba..4cf1473 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -1033,12 +1033,12 @@ (defun find-request-handler (path params) (let ((*requested-characteristics* - (append (when-let (langstr (or (cdr (assoc "lang" params :test #'equal)) - (cdr (assoc "hl" params :test #'equal)))) - (let ((langs (split-sequence #\| langstr))) - (mapcar (lambda (x) (list (cons "language" x))) - langs))) - *default-characteristics-precedence-list*)) + (or (when-let (langstr (or (cdr (assoc "lang" params :test #'equal)) + (cdr (assoc "hl" params :test #'equal)))) + (let ((langs (split-sequence #\| langstr))) + (mapcar (lambda (x) (list (cons "language" x))) + langs))) + *default-characteristics-precedence-list*)) (*propagated-params* (remove-if-not (lambda (x) (equal (car x) "lang")) params))) |