Hi there all,
In order to try get some parsing speed back as well as improve accuracy, I've changed the way the
MIMEH_parse_header_parameter() function operates. Previously it'd use a strstr() call to locate the parameter it was
seeking (ie, 'boundary' for Content-Type), however now I make it so that the parameter name is aligned to the start of
the string which the function searches. What this means is that I can now use strncasecmp() rather than strstr() which
of course is quite a bit quicker, however, more importantly, it's more /accurate/ because the header parsing is no
longer tricked by things like:
boundary="sdhsdhlshnamesdvsds" <=- old code would trigger on the the sequence 'name' in the boundary when looking for
'name'.
The code is available as the 1.4-dev download. Feel free to test it out, see if I've completely stuffed up anything.
So far my testing has shown that I actually found one more file/attachment out of ~45,000.
Paul.
--
PLDaniels - Software - Xamime
Unix systems Internet Development A.B.N. 19 500 721 806
PGP Public Key at http://www.pldaniels.com/gpg-keys.pld
_______________________________________________
Ripmime-general mailing list
Ripmime-general@pldaniels.com
http://www.pldaniels.com/mailman/listinfo/ripmime-general
In order to try get some parsing speed back as well as improve accuracy, I've changed the way the
MIMEH_parse_header_parameter() function operates. Previously it'd use a strstr() call to locate the parameter it was
seeking (ie, 'boundary' for Content-Type), however now I make it so that the parameter name is aligned to the start of
the string which the function searches. What this means is that I can now use strncasecmp() rather than strstr() which
of course is quite a bit quicker, however, more importantly, it's more /accurate/ because the header parsing is no
longer tricked by things like:
boundary="sdhsdhlshnamesdvsds" <=- old code would trigger on the the sequence 'name' in the boundary when looking for
'name'.
The code is available as the 1.4-dev download. Feel free to test it out, see if I've completely stuffed up anything.
So far my testing has shown that I actually found one more file/attachment out of ~45,000.
Paul.
--
PLDaniels - Software - Xamime
Unix systems Internet Development A.B.N. 19 500 721 806
PGP Public Key at http://www.pldaniels.com/gpg-keys.pld
_______________________________________________
Ripmime-general mailing list
Ripmime-general@pldaniels.com
http://www.pldaniels.com/mailman/listinfo/ripmime-general