Documentation

Std.Internal.Http.Data.Headers.Name

Header Names #

This module defines the Name type, which represents validated HTTP header names that conform to HTTP standards.

Reference: https://www.rfc-editor.org/rfc/rfc9110.html#section-5

@[reducible, inline]

Proposition asserting that a string is a valid HTTP header name: all characters are valid token characters and the string is non-empty.

Reference: https://www.rfc-editor.org/rfc/rfc9110.html#name-field-names

Equations
Instances For

    A validated HTTP header name that ensures all characters conform to HTTP standards. Header names are case-insensitive according to HTTP specifications.

    Reference: https://www.rfc-editor.org/rfc/rfc9110.html#name-field-names

    • value : String

      The lowercased normalized header name string.

    • isValidHeaderValue : IsValidHeaderName self.value

      The proof that it's a valid header name.

    • isLowerCase : Internal.IsLowerCase self.value

      The proof that we stored the header name in stored as a lower case string.

    Instances For
      theorem Std.Http.Header.Name.ext {x y : Name} (value : x.value = y.value) :
      x = y
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Std.Http.Header.instDecidableEqName.decEq (x✝ x✝¹ : Name) :
        Decidable (x✝ = x✝¹)
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[implicit_reducible]
          Equations
          @[implicit_reducible]
          Equations
          • One or more equations did not get rendered due to their size.

          Attempts to create a Name from a String, returning none if the string contains invalid characters for HTTP header names or is empty.

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

            Creates a Name from a string, panicking with an error message if the string contains invalid characters for HTTP header names or is empty.

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

              Converts the header name to title case (e.g., "Content-Type").

              Note: some well-known headers have unconventional casing (e.g., "WWW-Authenticate"), but since HTTP header names are case-insensitive, this always uses simple capitalization.

              Equations
              Instances For

                Performs a case-insensitive comparison between a Name and a String. Returns true if they match.

                Equations
                Instances For
                  @[implicit_reducible]
                  Equations

                  Standard Content-Type header name

                  Equations
                  Instances For

                    Standard Content-Length header name

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

                      Standard Host header name

                      Equations
                      Instances For

                        Standard Authorization header name

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

                          Standard User-Agent header name

                          Equations
                          Instances For

                            Standard Accept header name

                            Equations
                            Instances For

                              Standard Connection header name

                              Equations
                              Instances For

                                Standard Transfer-Encoding header name

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

                                  Standard Server header name

                                  Equations
                                  Instances For

                                    Standard Date header name

                                    Equations
                                    Instances For

                                      Standard Expect header name

                                      Equations
                                      Instances For