title: Node.js set wrong content length. how do i set this one
body: <p>I need some help. Even I set content-length to response object, it seems doesn't work. Did I something wrong?</p>
  
  <pre><code>res.set({
    'Content-Type': res._data.ContentType,
    'Content-Length': res._data.ContentLength,
    ETag: res._data.ETag
  });
  res.send(res._data.Body);
  </code></pre>
  
  <p>I use express and body-parser to send data, and I set Content-Length.</p>
  
  <pre><code>res.header('Content-Type', res._data.ContentType);
  res.header('content-length', res._data.ContentLength);
  res.header('Cache-Control', 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0');
  </code></pre>
  
  <p>I tried this one too.</p>
  
  <pre><code>{ AcceptRanges: 'bytes',
    LastModified: 'Thu, 15 Jan 2015 22:23:43 GMT',
    ContentLength: '648789',
    ETag: '"7da971554e6ff4f6dfcdb7b2ba5e0be3"',
    ContentType: 'image/jpeg',
    Metadata: {},
    Body: &lt;Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48 00 48 00 00 ff db 00 43 00 08 06 06 07 06 05 08 07 07 07 09 09 08 0a 0c 14 0d 0c 0b 0b 0c 19 12 13 0f 14 ...&gt; }
  </code></pre>
  
  <p>This is result of <code>console.log(res._data)</code>. As you see I set content-length.</p>
  
  <pre><code>GET /api/images/54b83dec5e7d97c546e0c41a 200 584.524 ms - 1227943
  </code></pre>
  
  <p>But node.js response wrong content-length to client as size 1227943.</p>
  
  <pre><code>Cache-Control:no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0
  Connection:keep-alive
  content-length:1227943
  Content-Type:image/jpeg
  Date:Thu, 15 Jan 2015 23:37:52 GMT
  ETag:"7da971554e6ff4f6dfcdb7b2ba5e0be3"
  X-Powered-By:Express
  </code></pre>
  
  <p>And client receive too. Someone knows what I missed?
  Please help me.</p>
  
  <p>Oh I forgot to mentioned it. When I use Postman(chrome extension) to get data, It works fine.</p>
  
  <pre><code>GET /api/images/54b83dec5e7d97c546e0c41a 200 664.427 ms - 648789
  </code></pre>
  
  <p>So really I don't know why it happened.</p>