From: Chris Hanson Date: Mon, 7 Feb 2000 23:23:45 +0000 (+0000) Subject: Trim leading and trailing whitespace from header values. X-Git-Tag: 20090517-FFI~4256 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d8c78ae976eafe49930281cc76d5c3f3e8cec9e6;p=mit-scheme.git Trim leading and trailing whitespace from header values. --- 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)