HTTP(s) switch, error handling, more tests