1 From bdbcd8615e1720b4098296752a2f4273a0947a8d Mon Sep 17 00:00:00 2001
2 From: Daniel Badea <daniel.badea@windriver.com>
3 Date: Tue, 6 Sep 2016 15:09:39 +0000
4 Subject: [PATCH] CGTS-2869 close connection on HTTP 413 Request Entity Too
7 Discard request body in case it's too large: close connection
8 wile request is in progress.
10 eventlet/wsgi.py | 2 ++
11 1 file changed, 2 insertions(+)
13 diff --git a/eventlet/wsgi.py b/eventlet/wsgi.py
14 index 6af2b99..8eac966 100644
15 --- a/eventlet/wsgi.py
16 +++ b/eventlet/wsgi.py
17 @@ -525,6 +525,8 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
19 if hasattr(result, 'close'):
21 + if str(status_code[0]) == '413':
22 + self.close_connection = 1
23 request_input = self.environ['eventlet.input']
24 if (request_input.chunked_input or
25 request_input.position < (request_input.content_length or 0)):