• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Brunowar12 / TaskManagerSystem / 14985280590

13 May 2025 12:18AM UTC coverage: 93.727%. First build
14985280590

Pull #22

github

web-flow
Merge 404d37b71 into 7f7191a36
Pull Request #22: Polishing & refinement

699 of 735 new or added lines in 31 files covered. (95.1%)

1509 of 1610 relevant lines covered (93.73%)

9.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/TaskManagerSystem/middleware.py
1
from django.conf import settings
10✔
2
from django.http import HttpResponse
10✔
3

4

5
class RejectLargeRequestsMiddleware:
10✔
6
    def __init__(self, get_response):
10✔
7
        self.get_response = get_response
10✔
8
        self.max_length = getattr(settings, 'MAX_REQUEST_BODY_SIZE', 1024 * 1024 * 25)  # 25MB
10✔
9

10
    def __call__(self, request):
10✔
11
        content_length = request.META.get('CONTENT_LENGTH')
10✔
12
        if content_length is not None:
10✔
13
            try:
10✔
14
                if int(content_length) > self.max_length:
10✔
15
                    return HttpResponse('Payload Too Large', status=413)
10✔
NEW
16
            except (ValueError, TypeError):
×
NEW
17
                pass
×
18
        return self.get_response(request)
10✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc