changeset 7209:d7d885b6dd46 HEAD

Fixed squat-test
author Timo Sirainen <tss@iki.fi>
date Sun, 03 Feb 2008 22:42:46 +0200
parents eec99cefd3bd
children f5f77a3ae203
files src/plugins/fts-squat/squat-test.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/fts-squat/squat-test.c	Sun Feb 03 22:41:51 2008 +0200
+++ b/src/plugins/fts-squat/squat-test.c	Sun Feb 03 22:42:46 2008 +0200
@@ -94,8 +94,6 @@
 
 		if (mime_header) {
 			if (*line == '\0') {
-				if (data_header)
-					seq++;
 				data_header = FALSE;
 				mime_header = FALSE;
 				continue;
@@ -112,7 +110,11 @@
 		if (*line == '\0')
 			continue;
 
-		index_type = data_header ? SQUAT_INDEX_TYPE_HEADER :
+		/* we're actually indexing here headers as bodies and bodies
+		   as headers. it doesn't really matter in this test, and
+		   fixing it would require storing headers temporarily
+		   elsewhere and index them only after the body */
+		index_type = !data_header ? SQUAT_INDEX_TYPE_HEADER :
 			SQUAT_INDEX_TYPE_BODY;
 
 		buffer_set_used_size(valid, 0);