In a blog post I use the following PHP to set the content-type of a response:
header('content-type: application/json; charset=utf-8');
I just got a comment on that post saying that content-type
needs to be capitalized, Content-type
. Is this correct? It seems to work for me with all lower-case, and I assumed the HTTP headers were case-insensitive. Or does it just work because browsers are nice?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…