X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-devtools%2Fpython%2Ffiles%2Frequests%2F0001-close-connection-on-HTTP-413-Request-Entit.patch;fp=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-devtools%2Fpython%2Ffiles%2Frequests%2F0001-close-connection-on-HTTP-413-Request-Entit.patch;h=0000000000000000000000000000000000000000;hb=6fc6934434f70595536a387ece31bc30141cafb5;hp=5779d4be2e31204fcf85f380de3b54eb917ce530;hpb=eb1e26510491ba49de693ab3b0498edcb06be6c5;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-cloud/recipes-devtools/python/files/requests/0001-close-connection-on-HTTP-413-Request-Entit.patch b/meta-starlingx/meta-stx-cloud/recipes-devtools/python/files/requests/0001-close-connection-on-HTTP-413-Request-Entit.patch deleted file mode 100644 index 5779d4b..0000000 --- a/meta-starlingx/meta-stx-cloud/recipes-devtools/python/files/requests/0001-close-connection-on-HTTP-413-Request-Entit.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 268a1f179e554027637bd2951b24ad44ecb4a1ee Mon Sep 17 00:00:00 2001 -From: Daniel Badea -Date: Wed, 7 Sep 2016 09:10:10 +0000 -Subject: [PATCH] close connection on HTTP 413 Request Entity Too - Large - -Allow low_conn to retrieve/handle unread response data buffers -in case ProtocolError or socket.error are raised while sending -request data. ---- - requests/adapters.py | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/requests/adapters.py b/requests/adapters.py -index fd46325..087258a 100644 ---- a/requests/adapters.py -+++ b/requests/adapters.py -@@ -466,12 +466,18 @@ class HTTPAdapter(BaseAdapter): - - low_conn.endheaders() - -- for i in request.body: -- low_conn.send(hex(len(i))[2:].encode('utf-8')) -- low_conn.send(b'\r\n') -- low_conn.send(i) -- low_conn.send(b'\r\n') -- low_conn.send(b'0\r\n\r\n') -+ try: -+ for i in request.body: -+ low_conn.send(hex(len(i))[2:].encode('utf-8')) -+ low_conn.send(b'\r\n') -+ low_conn.send(i) -+ low_conn.send(b'\r\n') -+ low_conn.send(b'0\r\n\r\n') -+ except (ProtocolError, socket.error) as err: -+ # allow low_conn to retrieve/handle unread response -+ # data buffers in case ProtocolError or socket.error -+ # are raised while sending request data -+ pass - - # Receive the response from the server - try: --- -1.8.3.1 -