# proxy error with invalid content-length

**URL:** <https://community.fly.io/t/proxy-error-with-invalid-content-length/12679>\
**Category:** General\
**Tags:** login-only\
**Created:** [May 3, 2023, 3:10pm UTC](https://community.fly.io/t/proxy-error-with-invalid-content-length/12679 "2023-05-03T15:10:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcardarella](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bcardarella/32/11009_2.png) [@bcardarella](https://community.fly.io/u/bcardarella)\
**Post date:** [May 3, 2023, 3:10pm UTC](https://community.fly.io/t/proxy-error-with-invalid-content-length/12679/1 "2023-05-03T15:10:18Z")

</div>

In our monitor we see the following error:

```auto
proxy[6e3da7cf] ewr [error] could not make HTTP request to instance: invalid content-length parsed

```

It isn’t listed under `app` so I’m not sure how best to diagnose this

---

<div class="post-metadata">

**Author:** ![MatthewIngwersen](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@MatthewIngwersen](https://community.fly.io/u/MatthewIngwersen)\
**Post date:** [May 3, 2023, 4:40pm UTC](https://community.fly.io/t/proxy-error-with-invalid-content-length/12679/2 "2023-05-03T16:40:37Z")

</div>

Hi @bcardarella! This error comes from Fly’s proxy. It looks like somewhere along the line, the proxy is receiving an HTTP response with an invalid `Content-Length` header.

Are you seeing this error frequently in your logs?

Not sure if this will help, but you could check whether your app itself is generating the bad `Content-Length` header by making requests to it directly, bypassing `fly-proxy`. Here’s one concrete way to do that:

```auto
# Proxy localhost:<local port> to your app's <remote port>:
fly proxy <local port>:<remote port>

# In another terminal, while fly proxy is running, make a request to your app.
# -v will cause curl to print headers:
curl -v -H 'Host: <app domain name>' http://localhost:<local port>

```

---

<div class="post-metadata">

**Author:** ![bcardarella](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bcardarella/32/11009_2.png) [@bcardarella](https://community.fly.io/u/bcardarella)\
**Post date:** [May 3, 2023, 5:06pm UTC](https://community.fly.io/t/proxy-error-with-invalid-content-length/12679/3 "2023-05-03T17:06:20Z")

</div>

This can be closed, I found where this was happening and corrected the content-length value

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [May 10, 2023, 5:07pm UTC](https://community.fly.io/t/proxy-error-with-invalid-content-length/12679/4 "2023-05-10T17:07:19Z")

</div>

Closed on May 10, 2023, 5:07pm UTC

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