Commit 57520aaf authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed test_httplib and test_urllib2_localnet

parent 9435180d
target all: LC_ALL=$(SYSTEM_LOCALE) target all: LC_ALL=$(SYSTEM_LOCALE)
all: all:
tar xf Python-2.7.16.tar.xz tar xf Python-2.7.16.tar.xz
patch -Np1 -d Python-2.7.16 < Python-2.7.16-OpenSSL_1.1.1_test_fix.patch
cd Python-2.7.16 && sed -i '/#SSL/,+3 s/^#//' Modules/Setup.dist cd Python-2.7.16 && sed -i '/#SSL/,+3 s/^#//' Modules/Setup.dist
cd Python-2.7.16 && ./configure --build=$(CLFS_TARGET) --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes --enable-unicode=ucs4 --enable-optimizations cd Python-2.7.16 && ./configure --build=$(CLFS_TARGET) --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes --enable-unicode=ucs4 --enable-optimizations
$(MAKE) -C Python-2.7.16 $(MAKE) -C Python-2.7.16
......
diff -uNr Python-2.7.16/Lib/BaseHTTPServer.py Python-2.7.16-OpenSSL_1.1.1_test_fix/Lib/BaseHTTPServer.py
--- Python-2.7.16/Lib/BaseHTTPServer.py 2019-03-03 04:47:42.000000000 +1030
+++ Python-2.7.16-OpenSSL_1.1.1_test_fix/Lib/BaseHTTPServer.py 2019-09-25 03:54:53.146421649 +0930
@@ -332,6 +332,12 @@
self.log_error("Request timed out: %r", e)
self.close_connection = 1
return
+ except socket.error as exc:
+ # Using ssl and OpenSSL 1.1.1, sometimes readline() can fail
+ # with error(104, 'Connection reset by peer')
+ self.close_connection = 1
+ exc = None
+ return
def handle(self):
"""Handle multiple requests if necessary."""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment