add handling for bad requests without hostname