maiha / pcap.cr

Crystal bindings for libpcap
MIT License
25 stars 3 forks source link

Ommit display of blank body lines #3

Closed puppetpies closed 8 years ago

puppetpies commented 8 years ago

When developing my WIre tool i discovered in body mode that there are blank lines which are a size of 2.

I was thinking maybe implement it in library however feels wrong at the lower level.

This isn't really a pull request its whatever you make / choose todo but for my tool i don't want blank lines in my database.

Just thought i would make you aware of it !

Regards,

Brian

maiha commented 8 years ago

Hi, Brian!

however feels wrong at the lower level

It should be I think :)

i don't want blank lines in my database

I agree with your use case, but ignoring blank lines sometimes breaks other cases. For example, I can image the case of monitoring ping messages that send some white spaces.

So, why don't you add a new option to control the behavior? I love the explicit way like that. Well, candidates are ...

Thought?

puppetpies commented 8 years ago

Ok code now in place !

puppetpies commented 8 years ago

Also removed constant as no longer required !

maiha commented 8 years ago

Ok, it seems nice hack! I'll merge this ASAP. Could you merge these 5 commits into 1 commit?

puppetpies commented 8 years ago

I will close this now open new thread !

maiha commented 8 years ago

FYI @puppetpies:

I was thinking maybe implement it in library however feels wrong at the lower level.

Found this problem, and fixed the bug! https://github.com/maiha/pcap.cr/commit/a1307f7970d183880b5f43020d22b81293210ae7

Regards, maiha