http: return nil when read_rest returns an empty list