title: Node.js http response end event?
body: <p>I was using this piece of code to send some http requests and get data, and it was working fine. I recently updated apache and php to latest versions, as well as node.</p>
  
  <p>And 'close' event stopped firing. I also tried 'end' and 'finish' none of this seems to be working. </p>
  
  <p>I need to know when response is ended so I can start processing data, usually it comes in several chunks. Can you guys help?</p>
  
  <pre><code>var req = http.request(options, function(res) {
        res.on('data', function (chunk) {
          if(chunk != null &amp;&amp; chunk != "") {
              dataString += chunk; c
          } 
        });
      });
  
      req.on('close', function () {
          //tadaa it is finished, so we can process dataString
      });
  
      req.write(post_data);
      req.end();
  </code></pre>
  
  <p>Current versions: Apache 2.4, PHP 5.4 node 0.10.9</p>
  
  <p>Maybe there is some particular config settings of Apache that prevents it from closing connection?</p>
  
  <p>P.S. I do not think it is Apache though.. I tried google.com with same result.. pretty strange... Anyone have a working code example? (load big data, and know when it ended)</p>