The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Content-Length Header being set by Slim

Paul Prior's Avatar

Paul Prior

09 Mar, 2012 02:46 PM

I just experienced a frustrating bug due to slim setting the ContentLength header and using new relic with its beacon. All pages returned were truncated by the length of the new relic beacon. Isnt the Content-Length header unnecessary most of the time?

  1. Support Staff 1 Posted by Josh Lockhart on 25 Mar, 2012 03:04 PM

    Josh Lockhart's Avatar

    Slim will set the Content-Length header based on the bytesize of its response. If the Content-Length header does not correspond with the true length of the response body, that's an issue. But I don't see any errors in the code that would cause this to happen.

    What is New Relic? Or a beacon? I need to know more context about your setup before I can diagnose this further.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac