Bug 31936

Summary: Papyon sends bad requests, which result in a memory leak in telepathy-butterfly
Product: Telepathy Reporter: Yoav <yoav.weiss.fr>
Component: papyonAssignee: Louis-Francis Ratté-Boulianne <lfrb>
Status: NEW --- QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: 0.4   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to avoid sending port number in URL when port is 80

Description Yoav 2010-11-26 05:58:10 UTC
Created attachment 40585 [details] [review]
Patch to avoid sending port number in URL when port is 80

Papyon 0.4.6 sends out requests to MSN's server that cause the server to return a 400 HTTP response ("Bad Request").
When such responses are received, telepathy-butterfly (through it's use of papyon) suffers from a huge memory leak. (about 200MB per hour on average)

Detailes:
In http://support.microsoft.com/kb/826437 you can see that the .Net framework 1.1 does not accept requests that contains ":" in the host name AND "&" in the URL because of a bug.
Papyon sends requests to port 80 to a URL of the form: http://65.54.48.32:80/gateway/gateway.dll?Action=poll&SessionID=962514443.0
The MSN server then responds to these responses with a '400 Bad Request' response.
These responses also result in a huge memory leak.

Workaround:
Since it is not necessary to send the port number with the URL when the port number is 80, I created a patch that avoids sending it in this case. This helps to avoid the 400 responses as well as the memory leak.
This attached patch relates to the papyon/gnet/protocol directory

Further details:
OS - Ubuntu 10.04 64 bit with all latest updates.
Comment 1 Louis-Francis Ratté-Boulianne 2010-11-26 09:45:54 UTC
So that patch fixes things for you ?! Weird.. what happens if the port is not 80 ? It accepts the extra ":" then ?

Do you have more info about the memory leak ? Where exactly does the response is leaked ? Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.