---
title: "Discussion on \"Duplicate HTTP Headers Sent as an Array: How to Debug Them\" | Hashnode"
description: "Discussion on \"Duplicate HTTP Headers Sent as an Array: How to Debug Them\". A header you set once can leave the client as repeated lines and reach the server as an array."
url: "https://hashnode.com/posts/debugging-duplicate-headers-sent-as-an-array/6af5320bc176a971010f75d2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Duplicate HTTP Headers Sent as an Array: How to Debug Them](https://blogs.powerduck.com/debugging-duplicate-headers-sent-as-an-array?utm_source=hashnode&utm_medium=feed)

A header you set once can leave the client as repeated lines and reach the server as an array.

3h ago · 5 min read · blogs.powerduck.com  
Read the article

-   [#api](https://hashnode.com/tag/api)
-   [#debugging](https://hashnode.com/tag/debugging)
-   [#programming](https://hashnode.com/tag/programming)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses 1

Markdown supported · ⌘↵ to post

[Daniel Collins](https://hashnode.com/@fabbalancecheckuae)

[38m ago](https://hashnode.com/posts/debugging-duplicate-headers-sent-as-an-array/6af5320bc176a971010f75d2/comment/6af555d18e486c9f7fb28734)

This is one of those bugs that can be surprisingly hard to track down, because the code looks correct at first glance. The key point here is to check the raw request, not just what the framework reports — proxies, middleware, and duplicate set calls can all add a second copy before the request reaches the server. Logging the headers at each step, and comparing what the client sent with what the server received, usually narrows it down quickly. It is also worth checking whether the header is being set in more than one place, such as both application code and a server configuration.
