Documentation

Std.Http.Protocol.H1.Parser

This module defines parsers for HTTP/1.1 request and response lines, headers, and body framing. The reference used is https://httpwg.org/specs/rfc9112.html.

Parses a request line and returns a fully-typed Request.Head. request-line = method SP request-target SP HTTP-version

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Parses a request line and returns the recognized HTTP method and version when available.

    request-line = method SP request-target SP HTTP-version

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Parses a single header field line, or returns none when it sees the blank line that terminates the header section.

      field-line = field-name ":" OWS field-value OWS CRLF
      
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Parses the size and extensions of a chunk.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Result of parsing partial or complete information.

          Instances For

            Parses a single chunk in chunked transfer encoding.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Parses fixed-size data that can be incomplete.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Parses fixed-size chunk data that can be incomplete.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Parses trailer headers after a chunked body and returns them as an array of name-value pairs.

                  This is exposed for callers that need the trailer values directly (e.g. clients). The internal protocol machine uses parseLastChunkBody instead, which discards trailer values.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Parses a status line and returns a fully-typed Response.Head. status-line = HTTP-version SP status-code SP [ reason-phrase ] Accepts only HTTP/1.1. For parsing where the version may be unrecognized and must be mapped to an error event, use parseStatusLineRawVersion.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Parses a status line and returns the status code plus recognized HTTP version when available. Consumes and discards the reason phrase.

                      status-line = HTTP-version SP status-code SP [ reason-phrase ] CRLF

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For