"Content-Length" header

G. S. Hayes sjdevnull at yahoo.com
Tue Aug 31 00:57:02 EDT 2004


"Justin" <justin__devine at hotmail.com> wrote in message news:<ch07ui$edo at odbk17.prod.google.com>...

> some webservers are CASE SENSITVE about their urls and some are not.

> unfortunately in order to standardize another part of my program I was

> converting all the urls to .lower()



Ouch.  Outside of the Windows world, most systems are case sensitive;
with respect to web servers, you'll find that many of the big ones
(e.g. Yahoo, Google) are.



The lesson to take away from this for the future is to never alter any
data without very good reason.  By doing so, you're throwing away
potentially useful information.  That means don't take the trailing
slash off of filenames, don't turn that "e with accent" into a plain
e, etc.  Certainly there are times to munge your data, but if there
isn't pressing reason to do so you're almost always best off keeping
it as pristine as possible--and often you want to store it in pristine
form and only munge it at the very time you HAVE to.



Something related to think about: if most users use only letters in
their passwords, making the passwords case-insensitive potentially
makes it take crackers HALF the time to crack a password by brute
force.  By making the passwords case-insensitive you've thrown away
information.  (though in practice, users who would use all letters are
unlikely to use mixed case; the point still remains, though)



More information about the Python-list mailing list