Packet level debugging for Ajax traffic

I encountered a session cookie issue while working with an ajax interaction. To debug this, Rinaldo suggested me to try a tool called balance. It is a proxy with the capability to output protocol level human readable debugging information. It is a lot easier to work with than other network monitor tools such as Wireshark, which I had to read the raw pack data. With balance, since the header information is human readable, I can easily filter out unwanted information by specify a keyword. In the example below, it will print all client submissions of cookies and all server responses with set cookies. The -fpd options will cause the tool to print all traffic to standard out. Rest of the parameters in this example forwards all traffic to the local host at port 8081 to the destination host “localhost” at port 8080. Thanks to Rinaldo, this tool helped me to get to the root cause that I was trying to identify.

balance -fpd 8081 localhost:8080 |grep Cookie

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s