some code refactoring and minor speed up (jump prediction rule)

This commit is contained in:
Miroslav Stampar 2010-05-14 15:20:34 +00:00
parent ed20f1cf33
commit 4984ceac49

View File

@ -285,29 +285,17 @@ class Connect:
if not place: if not place:
place = kb.injPlace place = kb.injPlace
if conf.parameters.has_key("GET"): if "GET" in conf.parameters:
if place == "GET" and value: get = conf.parameters["GET"] if place != "GET" or not value else value
get = value
else:
get = conf.parameters["GET"]
if conf.parameters.has_key("POST"): if "POST" in conf.parameters:
if place == "POST" and value: post = conf.parameters["POST"] if place != "POST" or not value else value
post = value
else:
post = conf.parameters["POST"]
if conf.parameters.has_key("Cookie"): if "Cookie" in conf.parameters:
if place == "Cookie" and value: cookie = conf.parameters["Cookie"] if place != "Cookie" or not value else value
cookie = value
else:
cookie = conf.parameters["Cookie"]
if conf.parameters.has_key("User-Agent"): if "User-Agent" in conf.parameters:
if place == "User-Agent" and value: ua = conf.parameters["User-Agent"] if place != "User-Agent" or not value else value
ua = value
else:
ua = conf.parameters["User-Agent"]
if conf.safUrl and conf.saFreq > 0: if conf.safUrl and conf.saFreq > 0:
kb.queryCounter += 1 kb.queryCounter += 1