Fix HTTP leading to "Invalid File" error

The =~ operator returns an integer that tells you where in the input the pattern was found. You should NOT convert this into an integer because an index of 0 would become false.