Content-Type for some backend ajax routes and eID scripts broken since "[TASK] Create own response instance in controller actions"
https://review.typo3.org/c/55754 refactored all PSR-7
related controllers to remove an own response.
Missing is the fact that ajax routes used a
pre-generated response with application/json
eID scripts did not use a pre-generated header
[BUGFIX] Use correct content types in backend ajax and eID responses
Due to the recent changes in the commit:
[TASK] Create own response instance in controller actions
..ajax routes and eID handlers that used a pre-generated Response
object (from the RequestHandler) now return different Content-Type
headers than before.
For backend ajax request applicaton/json was set by default,
for eID scripts no Content-Type was set (by default).
Change these controllers to use JsonResponse or a plain Response
to reflect the previous state..
The changes in this commit were intended to be squashed into the
mentioned commit – but this commit was too late. Therefore other (a bit)
unrelated optimizations to changes that patch made are included.
Tested-by: TYPO3com <email@example.com>
Reviewed-by: Anja Leichsenring <firstname.lastname@example.org>
Tested-by: Anja Leichsenring <email@example.com>
Reviewed-by: Christian Kuhn <firstname.lastname@example.org>
Tested-by: Christian Kuhn <email@example.com>