Actions
Bug #77427
closedWrong spelling of Content-Type header may lead to duplicate header
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2016-08-07
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
While debugging a BE login problem, I noticed that the response object in the ajax/rsa/publickey handler contains two Content-Type headers:
protected 'headers' => array (size=3) 'Content-type' => array (size=1) 0 => string 'application/json; charset=utf-8' (length=31) 'X-JSON' => array (size=1) 0 => string 'true' (length=4) 'Content-Type' => array (size=1) 0 => string 'text/html; charset=utf-8' (length=24)
It looks like my browser is automatically ignoring the older header, so the last one takes precedence and the other one is removed. Nevertheless, I think that it could lead to problems in some circumstances.
(My original problem has been solved in the meantime. I can tell for sure that it is not related to the issue I'm describing here. However, it should still be fixed...)
My suggestion is to fix the spelling of "Content-Type" in all places to prevent eventual problems.
See also: https://www.ietf.org/rfc/rfc2616.txt
Actions