better checking for ldap and jpilot headers