From 85d58d7b2bbcdb7d57418c9b65474f70f826c530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Mon, 2 Mar 2020 15:36:43 +0200 Subject: [PATCH] Messages further tuned. --- sanic/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sanic/http.py b/sanic/http.py index e96b5812..b217200b 100644 --- a/sanic/http.py +++ b/sanic/http.py @@ -117,7 +117,7 @@ class Http: break await self._receive_more() if pos >= self.request_max_size: - raise PayloadTooLarge("Request header too large") + raise PayloadTooLarge("Request header exceeds the size limit") # Parse header content try: reqline, *raw_headers = buf[:pos].decode().split("\r\n") @@ -348,7 +348,7 @@ class Http: # Request size limit if self.request_bytes > self.request_max_size: self.keep_alive = False - raise PayloadTooLarge("Request body too large") + raise PayloadTooLarge("Request body exceeds the size limit") # End of request body? if not self.request_bytes_left: self.request_body = None