zlib: don't assert on missing dictionary
authorBen Noordhuis <info@bnoordhuis.nl>
Tue, 22 Jan 2013 11:58:15 +0000 (12:58 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 22 Jan 2013 12:34:43 +0000 (13:34 +0100)
commit1c32eb4ae227f09e0e442ecd0445ec34d85332fe
tree6df54612c4a3c98250614f90c9f6604acb2bda3a
parent9c2c84546347df599840aceb59605b4b6d38a549
zlib: don't assert on missing dictionary

Handle Z_NEED_DICT errors graciously. Fixes the following assertion:

  node: ../src/node_zlib.cc:161: static void node::ZCtx::Process
  (uv_work_t*): Assertion`ctx->dictionary_ != __null && "Stream
  has no dictionary"' failed.
  Aborted (core dumped)

Fixes #4632.
src/node_zlib.cc
test/simple/test-zlib-dictionary-fail.js [new file with mode: 0644]