From 71543092b7ed7192f7fac066ec1c556c5f01063a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 25 Oct 2010 12:00:59 +0000 Subject: [PATCH] update regarding comparison engine --- lib/core/option.py | 1 + lib/request/comparison.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/core/option.py b/lib/core/option.py index 06bc58246..d625cfa47 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1005,6 +1005,7 @@ def __setConfAttributes(): conf.dbmsConnector = None conf.dbmsHandler = None conf.dumpPath = None + conf.errorComparison = True conf.minMatchBlock = 8 conf.dynMarkLength = 32 conf.httpHeaders = [] diff --git a/lib/request/comparison.py b/lib/request/comparison.py index 2b5b5902c..d2635a9fc 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -100,6 +100,10 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None): #elif conf.md5hash is not None: # return conf.md5hash == md5hash(page) + # In case of an DBMS error page return False + elif conf.errorComparison and kb.lastErrorPage and kb.lastErrorPage[0]==kb.lastRequestUID: + return False + # If the url is not stable it returns sequence matcher between the # first untouched HTTP response page content and this content else: