Update http.py

Use isalnum instead of isalpha then isdigit.

Also fixed an "Index out of range" error resulting from del(ls[i]) removing an element but not having that taken into account in in terms of length variable and loop iterations, hence i goes out of range.

I also made the if statement logic simpler.