expressjs / compression

Node.js compression middleware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

res.write not sending chunks until res.end() is called

loheswaran opened this issue · comments

I am sending a html page as multiple chunks using res.write with compression enabled in expressjs but the chunk are not sent until res.end() is called. I have use res.flush() after every res.write as given in the readme.
Note : Same is working if I disable compression in the expressjs.

Could you please help me in resolving this?

Hi @loheswaran absolutely, I would love to take a look! Can you please provide all the following?

  1. Version of Node.js you are using
  2. The exact version of this module and any others needed to run your code.
  3. Complete code that reproduces the issue.
  4. Complete instructions on how to run the code, recreate the issue, and some information on how you're validating that nothing it being sent until the res.end() call (i.e. are you looking at a packet capture in Wireshark or something else?).

Thanks!

Hi @dougwilson,
Thanks for the quick reply. Compression is working with a sample application. I will try to debug my application and let you know in-case of any issue.