Set more than one HTTP header with the same name?

后端 未结 5 2138
南旧
南旧 2020-12-23 19:19

As far as I know it is allowed by the HTTP spec to set more than one HTTP header with the same name. Is there any use case to do so (from client to server and vice versa)?

5条回答
  •  攒了一身酷
    2020-12-23 19:47

    Since duplicate headers can cause issues with various web-servers and APIs (regardless of what the spec says), I doubt there is any general purpose use case where this is best practice. That's not to say someone somewhere isn't doing it, of course.

提交回复
热议问题