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

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
      @[implicit_reducible]
      def Std.Http.Header.instDecidableEqName.decEq (x✝ x✝¹ : Name) :
      Decidable (x✝ = x✝¹)
      Instances For
        @[implicit_reducible]
        @[implicit_reducible]

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

        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.

          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.

            Instances For

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

              Instances For
                @[implicit_reducible]

                Standard Content-Type header name

                Instances For

                  Standard Content-Length header name

                  Instances For

                    Standard Host header name

                    Instances For

                      Standard Authorization header name

                      Instances For

                        Standard User-Agent header name

                        Instances For

                          Standard Accept header name

                          Instances For

                            Standard Connection header name

                            Instances For

                              Standard Transfer-Encoding header name

                              Instances For

                                Standard Server header name

                                Instances For

                                  Standard Date header name

                                  Instances For

                                    Standard Expect header name

                                    Instances For