fathonix / MikrotikCaptiveAutologin

Node.js script that automatically logs into Mikrotik captive portal.
MIT License
5 stars 1 forks source link

Process data on "end" event #1

Closed iyxan23 closed 11 months ago

iyxan23 commented 11 months ago

I've encountered an issue where mikrotik-captive-autologin just doesn't work, and I don't know why, so I had to login manually.

After doing some investigating, I discovered that the data event fired by the http module on a response of a request is getting called twice. It appears that the request is duplexed, so it fires the data request on multiple streams.

I made this PR to append those streams and finally process the response at the end.

fathonix commented 11 months ago

I thought you already ditched this lol. I'll try this first on my office network.

fathonix commented 11 months ago

LGTM

fathonix commented 11 months ago

I've bumped the version and published the new one on npm.

iyxan23 commented 11 months ago

thx