1.55b: Improved 404 directory no-parse checks.

This commit is contained in:
Steve Pinkham 2010-08-09 10:52:11 -04:00
parent 701f665ab9
commit 1794a045a0
3 changed files with 28 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Version 1.55b:
--------------
- Improved 404 directory no-parse checks.
Version 1.54b:
--------------

View File

@ -20,7 +20,7 @@
#
PROGNAME = skipfish
VERSION = 1.54b
VERSION = 1.55b
OBJFILES = http_client.c database.c crawler.c analysis.c report.c
INCFILES = alloc-inl.h string-inl.h debug.h types.h http_client.h \

View File

@ -2432,10 +2432,30 @@ bad_404:
req->pivot->r404_cnt = 0;
/* We can still try parsing the response, if it differs from parent
in any way... */
and is not on parent's 404 list. */
if (!RPAR(req)->res || !same_page(&RPRES(req)->sig, &RPAR(req)->res->sig))
if (!RPAR(req)->res) {
PIVOT_CHECKS(req->pivot->req, req->pivot->res);
} else {
if (!same_page(&RPRES(req)->sig, &RPAR(req)->res->sig)) {
struct pivot_desc* par;
par = dir_parent(req->pivot);
if (par) {
for (i=0;i<par->r404_cnt;i++)
if (same_page(&res->sig, &par->r404[i])) break;
}
if (!par || i == par->r404_cnt)
PIVOT_CHECKS(req->pivot->req, req->pivot->res);
}
}
} else DEBUG("* 404 detection successful.\n");