|
@@ -126,6 +126,9 @@
|
126
|
126
|
(loop-file-until s (lambda (x) (declare (ignore x))) #'parse-line hash))
|
127
|
127
|
hash))
|
128
|
128
|
|
|
129
|
+(defun end-of-headers-p (line)
|
|
130
|
+ (= (length line) 0))
|
|
131
|
+
|
129
|
132
|
(defun message-match (message pattern)
|
130
|
133
|
(let* ((scanner (cadr (gethash "regex" pattern)))
|
131
|
134
|
(regex (car (gethash "regex" pattern)))
|
|
@@ -133,7 +136,7 @@
|
133
|
136
|
(test))
|
134
|
137
|
(with-open-stream (message-stream (mel:message-header-stream message))
|
135
|
138
|
(loop for line = (read-line message-stream nil)
|
136
|
|
- while (and line (not test))
|
|
139
|
+ while (and line (not test) (not (end-of-headers-p line)))
|
137
|
140
|
do
|
138
|
141
|
(setf test (cl-ppcre:scan scanner line))))
|
139
|
142
|
test))
|