#3171·gunicorn

--limit-request-line check default to MAX_REQUEST_LINE

Author: christfriedbalizouCreated Mar 22, 2024Updated Aug 16, 2026

Increasing the limit request line above the MAX_REQUEST_LINE will default to MAX_REQUEST_LINE.

https://github.com/benoitc/gunicorn/blob/88fc4a43152039c28096c8ba3eeadb3fbaa4aff9/gunicorn/http/message.py#L249C9-L253C55

python
    # get max request line size
    self.limit_request_line = cfg.limit_request_line
    if (self.limit_request_line < 0
                or self.limit_request_line >= MAX_REQUEST_LINE):
            self.limit_request_line = MAX_REQUEST_LINE

This is an issue because the other option is to set the limit_request_line to 0 to make it unlimited. Is this configuration aimed to be 0 or less than MAX_REQUEST_LINE?

Can a higher limit be set as in Nginx? If so, I would be happy to submit a PR.