return location from headers when possible