more strict checking for headers