From d8c78ae976eafe49930281cc76d5c3f3e8cec9e6 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 7 Feb 2000 23:23:45 +0000 Subject: [PATCH] Trim leading and trailing whitespace from header values. --- v7/src/imail/imail-core.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index d1c3d115d..0664eff23 100644 --- a/v7/src/imail/imail-core.scm +++ b/v7/src/imail/imail-core.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-core.scm,v 1.23 2000/02/07 22:37:19 cph Exp $ +;;; $Id: imail-core.scm,v 1.24 2000/02/07 23:23:45 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -692,15 +692,16 @@ (define (get-first-header-field-value headers name error?) (let ((header (get-first-header-field headers name error?))) (and header - (header-field-value header)))) + (string-trim (header-field-value header))))) (define (get-last-header-field-value headers name error?) (let ((header (get-last-header-field headers name error?))) (and header - (header-field-value header)))) + (string-trim (header-field-value header))))) (define (get-all-header-field-values headers name) - (map header-field-value (get-all-header-fields headers name))) + (map (lambda (header) (string-trim (header-field-value header))) + (get-all-header-fields headers name))) (define (header-field-name? object) (and (string? object) -- 2.25.1