Indy icon indicating copy to clipboard operation
Indy copied to clipboard

Update TIdHTTPServer to handle long URIs and long request headers more cleanly

Open rlebeau opened this issue 1 year ago • 0 comments

If an HTTP client sends either:

  • a long request line that exceeds TIdIOHandler.MaxLineLength
  • a long header line that exceeds TIdIOHandler.MaxLineLength
  • number of headers that exceed TIdHTTPServer.MaximumHeaderLineCount

Then TIdHTTPServer raises an exception and closes the connection. It should send the client back a 414 or 431 response instead of (or at least before) raising the exception.

Also, add new MaximumUriLength and MaximumHeaderLineLength properties.

rlebeau avatar Apr 27 '23 16:04 rlebeau