Merge d63a30d28bcdb3963d7a1438573e94746b71b9b3 into d6c46342693205f0dae441b45742d9c85d41cf33

This commit is contained in:
yoanntizomba 2025-05-09 19:22:46 +02:00 committed by GitHub
commit 3698cd04b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,6 +214,14 @@ class Controller extends AbstractController
return 'application/xml';
}
if (in_array('application/pdf', $accept) && in_array('application/pdf', $produced)) {
return 'application/pdf';
}
if (in_array('image/png', $accept) && in_array('image/png', $produced)) {
return 'image/png';
}
// If we reach this point, we don't have a common ground between server and client
return null;
}