How about in the SQSResponse object
This commit is contained in:
parent
b732e116a4
commit
f8cbcfc098
2 changed files with 4 additions and 4 deletions
|
|
@ -11,6 +11,7 @@ from .exceptions import (
|
|||
)
|
||||
|
||||
MAXIMUM_VISIBILTY_TIMEOUT = 43200
|
||||
MAXIMUM_MESSAGE_LENGTH = 262144 # 256 KiB
|
||||
DEFAULT_RECEIVED_MESSAGES = 1
|
||||
SQS_REGION_REGEX = r'://(.+?)\.queue\.amazonaws\.com'
|
||||
|
||||
|
|
@ -106,6 +107,9 @@ class SQSResponse(BaseResponse):
|
|||
message = self.querystring.get("MessageBody")[0]
|
||||
delay_seconds = self.querystring.get('DelaySeconds')
|
||||
|
||||
if len(message) > MAXIMUM_MESSAGE_LENGTH:
|
||||
return "One or more parameters are invalid. Reason: Message must be shorter than 262144 bytes.", dict(status=400)
|
||||
|
||||
if delay_seconds:
|
||||
delay_seconds = int(delay_seconds[0])
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue