node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

fix: bodyReader works with gunzip and maxBodySize

Open jfilipczyk opened this issue 5 years ago • 1 comments

Pre-Submission Checklist

  • [X] Opened an issue discussing these changes before opening the PR
  • [X] Ran the linter and tests via make prepush
  • [X] Included comprehensive and convincing tests for changes

Issues

Closes:

  • https://github.com/restify/node-restify/issues/1785

Changes

Adds error handling for Gunzip errors so node process does not die. Fixes handling "413 Payload Too Large" for gzip encoded content.

jfilipczyk avatar May 15 '19 11:05 jfilipczyk

Dear maintainers, please review this and approve! It's a pity that Restify may be crashed just by setting Content-Encoding: gzip and POST-ing plain text body.

One workaround is server.on('uncaughtException', but it's bad and deprecated.

sergburn avatar Sep 10 '20 13:09 sergburn