Are HTTP headers case-sensitive?

后端 未结 8 2277
梦如初夏
梦如初夏 2020-11-22 03:03

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

8条回答
  •  有刺的猬
    2020-11-22 03:17

    header('Content-type: image/png') did not work with PHP 5.5 serving IE11, as in the image stream was shown as text

    header('Content-Type: image/png') worked, as in the image appeared as an image

    Only difference is the capital 'T'.

提交回复
热议问题