Fixing the "getallheaders" miss for certain PHP version