Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 610
    • Issues 610
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 87
    • Merge requests 87
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Merge requests
  • !6879

Rewrite isc_httpd using picohttpparser and isc_url_parse

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ondřej Surý requested to merge ondrej-refactor-isc_httpd into main Oct 07, 2022
  • Overview 40
  • Commits 4
  • Pipelines 14
  • Changes 11

Rewrite the isc_httpd to be more robust.

  1. Replace the hand-crafted HTTP request parser with picohttpparser for parsing the whole HTTP/1.0 and HTTP/1.1 requests. Limit the number of allowed headers to 10 (arbitrary number).

  2. Replace the hand-crafted URL parser with isc_url_parse for parsing the URL from the HTTP request.

  3. Increase the receive buffer to match the isc_netmgr buffers, so we can at least receive two full isc_nm_read()s. This makes the truncation processing much simpler.

  4. Process the received buffer from single isc_nm_read() in a single loop and schedule the sends to be independent of each other.

  5. Replace the truncated test with two new tests: a) test that sending more than 10 headers makes the connection to closed; b) test that sending huge HTTP request makes the connection to be closed.

Edited Oct 14, 2022 by Ondřej Surý
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ondrej-refactor-isc_httpd