- From: Raffaele Sena <raff@nuvomedia.com>
- Date: Fri, 5 Feb 1999 17:27:25 -0800
- To: "libwww" <www-lib@w3.org>
when looking for the file format (in HTBind_getFormat) and case insensitive
is selected,
the hash table entry MUST be calculated from the case-insensitive suffix.
(I assume the hash table has been calculated using lower-case only suffixes,
so I calculate
the hash table entry in the same way - the full fix should create the hash
table accordingly)
-- Raffaele
Index: HTBind.c
===================================================================
RCS file: /sources/public/libwww/Library/src/HTBind.c,v
retrieving revision 2.30
diff -r2.30 HTBind.c
456,457c456,459
< for( ; *ptr; ptr++)
< hash = (int)((hash*3+(*(unsigned char*)ptr)) % HASH_SIZE);
---
> for( ; *ptr; ptr++) {
> unsigned char c = (unsigned char) (HTCaseSen ? *ptr : tolower(*ptr));
> hash = (int)((hash*3+c) % HASH_SIZE);
>
Received on Friday, 5 February 1999 20:27:29 UTC