Ticket #2634 (new defect)

Opened 2 years ago

Gajim fails to assemble partial data

Reported by: junglecow Owned by: dkirov
Priority: normal Milestone:
Component: xmpppy Version:
Severity: normal Keywords:
Cc: OS:

Description

setting RECV_BUFSIZE to 16 in common/xmpp/transports_nb.py causes the connection to break without any warning or error, even in debug mode:

DEBUG: dispatcher   info  Registering protocol "message" as common.xmpp.protocol.Message(jabber:client)
DEBUG: socket       sent  <?xml version='1.0'?>
  <stream:stream xmlns="jabber:client" to="gajim.org" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" >
DEBUG: socket       got   <?xml version='1
DEBUG: client       stop  Disconnect detected

Setting RECV_BUFSIZE to 1048576 (the original value) in no way guarantees that we'll never receive partial XML stanzas. Networking just doesn't work that way. Not printing any warnings in case of protocol errors is a bug in itself. If this happens we experience a disconnect and probably think the cause is a network problem, while it's actually Gajim's fault. (In case you are wondering why you never experienced this bug before.)

The proper behavior is to recognize that the XML stanza isn't finished yet, and continue assembling until it is complete.

Attachments

Add/Change #2634 (Gajim fails to assemble partial data)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.