[DRE-maint] Bug#882308: http-parser 2.7 breaks ruby-em-http-request's tests

Christoph Biedl debian.axhn at manchmal.in-ulm.de
Wed Apr 4 00:28:39 BST 2018


forwarded 882308 https://github.com/igrigorik/em-http-request/issues/316
thanks

Jérémy Lal wrote...

> Control: reassign -1 ruby-em-http-request
> I took the liberty to reassign it to it. Feel free to reassign to
> whichever you see it would be better assigned.

Good question where to put it, you already figured this, see below.

> Please try this patch on ruby-em-http-request.
> 
> --- a/lib/em-http/http_connection.rb
> +++ b/lib/em-http/http_connection.rb
> @@ -131,7 +131,7 @@
>        end
> 
>        @p.on_message_complete = proc do
> -        if !client.continue?
> +        if client and !client.continue?
>            c = @clients.shift
>            c.state = :finished
>            c.on_request_complete

This does the trick. I was pretty close back in December but not
close enough.

> Bug or feature ? nodejs is using http-parser and has a thorough test suite,
> so i suppose we're on the safe side fixing this package (but my experience
> tells me i'm 80% wrong when i suppose things like that).

It looks a lot like a behaviour change in http-parser. Then
ruby-em-http-request cannot deal with an another on_message callback,
and fails. But I'd like to see that in the sources. Good question who is
to blame for this, the documentation for on_message is rather terse.
Hardening ruby-em-http-request using your patch is certainly a good
thing to do.

To increase the noise, I've also opened an issue at
ruby-em-http-request's upstream.

    Christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20180404/d9c7f112/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list