[jabberpy/el6] use blocking read in initial communication with http proxy
Milan Zazrivec
mzazrive at fedoraproject.org
Tue Jul 8 14:27:43 UTC 2014
commit 9a8512e502b305d8a46e9c0613a5ed8dc864d8ca
Author: Milan Zazrivec <mzazrivec at redhat.com>
Date: Tue Jul 8 16:27:27 2014 +0200
use blocking read in initial communication with http proxy
jabberpy-proxy-read.patch | 11 +++++++++++
jabberpy.spec | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/jabberpy-proxy-read.patch b/jabberpy-proxy-read.patch
new file mode 100644
index 0000000..e723ee7
--- /dev/null
+++ b/jabberpy-proxy-read.patch
@@ -0,0 +1,11 @@
+--- jabberpy-0.5-0/jabber/xmlstream.py
++++ jabberpy-0.5-0/jabber/xmlstream.py
+@@ -522,7 +522,7 @@ class Client(Stream):
+ connector.append('\r\n')
+ bak = self._read , self._write
+ self.write('\r\n'.join(connector))
+- reply = self.read().replace('\r','')
++ reply = self._read(BLOCK_SIZE).replace('\r','')
+ self._read , self._write = bak
+ try: proto,code,desc=reply.split('\n')[0].split(' ',2)
+ except: raise error('Invalid proxy reply')
diff --git a/jabberpy.spec b/jabberpy.spec
index a640b38..5f5e494 100644
--- a/jabberpy.spec
+++ b/jabberpy.spec
@@ -2,7 +2,7 @@
Name: jabberpy
Version: 0.5
# Used like this because upstream releases like 0.5-0
-Release: 0.22%{?dist}
+Release: 0.23%{?dist}
Summary: Python xmlstream and jabber IM protocol libs
Group: Development/Libraries
@@ -13,6 +13,7 @@ Patch0: jabberpy-no-init.patch
Patch1: jabberpy-clean-sockets.patch
Patch2: jabberpy-ipv6.patch
Patch3: jabberpy-sha-deprecation.patch
+Patch4: jabberpy-proxy-read.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -33,6 +34,7 @@ chmod -x examples/*.py
%patch1 -p1 -b .clean-sockets
%patch2 -p0 -b .ipv6
%patch3 -p0 -b .sha-deprecation
+%patch4 -p0 -b .proxy
%build
%{__python} setup.py build
@@ -51,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Jul 8 2014 Milan Zazrivec <mzazrivec at redhat.com> 0.5-0.23
+- use blocking read in initial communication with http proxy
+
* Tue Mar 20 2012 Milan Zazrivec <mzazrivec at redhat.com> 0.5-0.22
- fix sha module deprecation warning
More information about the scm-commits
mailing list