# 2.0.2 Http Request node header casing lost

**URL:** <https://discourse.nodered.org/t/2-0-2-http-request-node-header-casing-lost/48790>\
**Category:** General\
**Created:** [22 July 2021 20:23 UTC](https://discourse.nodered.org/t/2-0-2-http-request-node-header-casing-lost/48790 "2021-07-22T20:23:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![i8beef](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/i8beef/32/3161_2.png) [@i8beef](https://discourse.nodered.org/u/i8beef)\
**Post date:** [22 July 2021 20:23 UTC](https://discourse.nodered.org/t/2-0-2-http-request-node-header-casing-lost/48790/1 "2021-07-22T20:23:26Z")

</div>

After upgrading I've got at least one Http Request node that seems to be broken... It sets up a request message and sets the "Host" header as follows, but the request now fails, claiming I'm not sending that header,

```auto
var newMsg = {};
newMsg.url = "http://192.168.1.52/getData.json";
newMsg.headers = {};
newMsg.headers["Host"] = "192.168.1.52";
newMsg.headers["Authorization"] = "Basic HARDCODEDBASICAUTH";
return newMsg;

```

I see there's a few different tickets open around the Http Request nodes having some oddities right now, does this fit in with one of them?

Edit: Possibly because a case sensitive issue around the header name being toLowercase() here: [node-red/21-httprequest.js at master · node-red/node-red · GitHub](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/nodes/core/network/21-httprequest.js#L200)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [22 July 2021 20:34 UTC](https://discourse.nodered.org/t/2-0-2-http-request-node-header-casing-lost/48790/2 "2021-07-22T20:34:28Z")

</div>

Please open an issue on GitHub so we can keep track.

---

<div class="post-metadata">

**Author:** ![i8beef](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/i8beef/32/3161_2.png) [@i8beef](https://discourse.nodered.org/u/i8beef)\
**Post date:** [22 July 2021 20:45 UTC](https://discourse.nodered.org/t/2-0-2-http-request-node-header-casing-lost/48790/3 "2021-07-22T20:45:23Z")

</div>

👍

> <https://github.com/node-red/node-red/issues/3081>
>
> \### Current Behavior
> 
> When setting headers for an HttpRequest, it appears to "no…rmalize" all of them to lowercase, which means requests to endpoints that are actually case sensitive have no avenue to actually function.
> 
> \### Expected Behavior
> 
> Headers should be piped through as specified for all headers rather than transforming them.
> 
> \### Steps To Reproduce
> 
> Send a request to any device / endpoint that makes a case-sensitive header evaluation (In my case, it was the "Host" header always being translated to "host", and the callee not liking that.
> 
> \### Example flow
> 
> \`\`\`
> var newMsg = {};
> newMsg.url = "endpointThatCaresAboutHostHeaderCase";
> newMsg.headers = {};
> newMsg.headers\["Host"\] = "192.168.1.1";
> return newMsg;
> \`\`\`
> 
> 
> \### Environment
> 
> \- Node-RED version: 2.0.2
> \- Node.js version: Docker
> \- npm version: Docker
> \- Platform/OS: Docker
> \- Browser: Chrome

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 August 2021 19:46 UTC](https://discourse.nodered.org/t/2-0-2-http-request-node-header-casing-lost/48790/4 "2021-08-12T19:46:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
