in reply to Re^9: Sniffer::HTTP problem with timeout
in thread Sniffer::HTTP problem with timeout

No, I think your usage is good, and matches the documentation. It is just that proper closing of connections seems to be handled badly in Sniffer::HTTP::Connection, in that a closed connection never signals to the main runloop that it got closed. In theory, you should see log messages like Removed $host:$port , but from looking at the code, that doesn't seem to happen.

If you can provide me with a small, non-sensitive packet capture (via dump-raw.pl, included with Sniffer::HTTP) where a connection gets properly closed, that would be great. I can then test against this and even include it in the test suite so that the bug never comes back.

Replies are listed 'Best First'.
Re^11: Sniffer::HTTP problem with timeout
by ponley (Novice) on Mar 23, 2011 at 20:19 UTC
    I see the Removed $host:$port occasionally but as you mentioned not nearly as often as I should. I would be happy to send you a capture, what do you consider to be small and how should I send it? Also I used cpan>install to install Sniffer::HTTP but I don't see dump-raw.pl in the /usr/local/share/perl/5.10.1/Sniffer folder. Do I need to get the full package or is it somewhere else?

    Update

    OK, locate is my friend, I found dump-raw.pl but I'm not sure what you want me to do with it. Do I use it to get a set of packets and then feed them to sniffer?

      dump-raw.pl lives at least in Sniffer::HTTP, in the bin directory. I will arrange that starting with the next release, it gets installed in the Perl directory as well.

      As for packet captures for the connection, I don't mind anything below 50MB for debugging. For keeping and distributing the test, I think that something below 1MB is better. My email address should be in the module too, but I can be reached via corion@cpan.org.

        I'm guessing that you want a set of packets from my system to run over and over do debug this issue. I have started dump-raw.pl and my test.pl (with screen output redirected to a file) at the same time. I have the raw dump in one folder and the actual captured files and screen dump in another.
        Somewhat interesting:
        # grep -c "Response header and content are ready" output 162 # grep -c "Creating" output 97 # grep -c "Removing" output 37


        I need to know what method of archive you prefer. Tar, zip....