$exclude_string = UrlHelper::
uncompressQueryParameter($request->query->
get('exclude'
));
if (!
$exclude_string) { throw new BadRequestHttpException('The libraries to exclude are encoded incorrectly.'
);
} $attached_assets->
setAlreadyLoadedLibraries(explode(',',
$exclude_string));
} $groups =
$this->
getGroups($attached_assets,
$request);
$group =
$this->
getGroup($groups,
$request->query->
get('delta'
));
// Generate a hash based on the asset group, this uses the same method as
// the collection optimizer does to create the filename, so it should match.
$generated_hash =
$this->
generateHash($group);
$data =
$this->optimizer->
optimizeGroup($group);
// However, the hash from the library definitions in code may not match the
// hash from the URL. This can be for three reasons:
// 1. Someone has requested an outdated URL, i.e. from a cached page, which
// matches a different version of the code base.
// 2. Someone has requested an outdated URL during a deployment. This is
// the same case as #1 but a much shorter window.
// 3. Someone is attempting to craft an invalid URL in order to conduct a
// denial of service attack on the site.
// Dump the optimized group into an aggregate file, but only if the