You'll fix this, or shall I go ahead and commit to my fork?
On May 27, 2014 8:23 AM, "Douglas Christopher Wilson" <
notifications@github.com> wrote:

> In index.js:
>
> > +  function onCompressedEnd() {
> > +    if (compressedReceived < length) {
> > +      err = new Error('compressed stream too short')
> > +      err.status = 400
> > +      next(err)
> > +      return
> > +    } else if (compressedReceived > length) {
> > +      err = new Error('compressed stream too long')
> > +      err.status = 400
> > +      next(err)
> > +      return
> > +    }
> > +  }
> > +  function setupCompressedStream() {
> > +    // assert the stream encoding is buffer.
> > +    if (req._decoder || (req._readableState && req._readableState.encoding !== null)) {
>
> I just found out thanks to node.js > 0.8 but < 0.10.6, we need this
> conditional to be:
>
> if (req._decoder || (req._readableState && (req._readableState.encoding !== null || req._readableState.decoder))) {
>
> otherwise people using older versions of 0.10 will always trigger this
> error (since req._readableState.encoding will be undefined).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/expressjs/body-parser/pull/20/files#r13062528>
> .
>