http: simplify condition