adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
531 stars 128 forks source link

Bug in WebSocket close method if supply reason argument #356

Closed CoderNate closed 10 months ago

CoderNate commented 1 year ago

This is a minor thing because most people probably never use the code or the reason but it looks like the code is currently ignored instead of being prepended to the reason when forming data.

https://github.com/adamdruppe/arsd/blob/975e3526569c1a743a1d467f1ff73c79e45da347/http2.d#L4882

adamdruppe commented 1 year ago

oh yeah i didn't read that part of the spec closely enough. looks easy enough to add, done now

CoderNate commented 1 year ago

Nice! I haven't read the spec but just looking at an example of an implementation it seems that either the data array should be empty or it should begin with a valid binary-encoded code and I'm not sure that 0 is a valid code. If a code is included in data maybe the default should be 1000 (normal closure).

adamdruppe commented 1 year ago

oh yeah ill change that that makes sense

adamdruppe commented 10 months ago

this was released a while ago so gonna close now