http: merge ifs