web: handle protocols and extensions properly