~ubuntu-branches/ubuntu/trusty/gajim/trusty-proposed

« back to all changes in this revision

Viewing changes to src/common/xmpp/transports_nb.py

  • Committer: Bazaar Package Importer
  • Author(s): Yann Leboulanger
  • Date: 2011-06-19 21:46:09 UTC
  • mfrom: (10.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110619214609-lsn9c8bd4ciswy6w
Tags: 0.14.3-1
* New upstream release.
* Fix closing roster window. Closes: #630315

Show diffs side-by-side

added added

removed removed

Lines of Context:
740
740
                httpbody - string with http body)
741
741
                http_rest - what is left in the message after a full HTTP header + body
742
742
        """
743
 
        message = message.replace('\r', '')
744
 
        message = message.lstrip('\n')
745
 
        splitted = message.split('\n\n')
 
743
        splitted = message.split('\r\n\r\n')
746
744
        if len(splitted) < 2:
747
745
            # no complete http message. Keep filling the buffer until we find one
748
746
            buffer_rest = message
749
747
            return ('', '', '', buffer_rest)
750
748
        else:
751
749
            (header, httpbody)  = splitted[:2]
 
750
            header = header.replace('\r', '')
 
751
            header = header.lstrip('\n')
752
752
            header = header.split('\n')
753
753
            statusline = header[0].split(' ', 2)
754
754
            header = header[1:]