fix wrong https value when server value has capital letters. Also is usually a better idea to check for on that for off

the patch is basically for line 161. The other lines must have had trailing spaces.