Update http.py

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