Project

General

Profile

Bug #77427

Updated by Michael Stucki almost 8 years ago

While debugging a BE login problem, I noticed that the response object in the ajax/rsa/publickey handler contains two Content-Type headers: 

 <pre> 
   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) 
 </pre> 

 It looks like Meanwhile my browser is automatically ignoring the older header, original problem has been solved, so I can say that the last one takes precedence and duplicate header was not the other one is removed. cause of my problem. 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

Back