async def process_request(
        self, request: Union[Request, HTTPConnection]
    ) -> Optional[datetime.datetime]:
        """
        Has to be as stated in rfc2616 which uses rfc1123. Has to be in GMT.
        Returns UTC datetime.

        Examples allowed:     Wed, 01 Jan 2020 04:27:12 GMT     Wed, 01
        Jan 2020 04:27:12
        """

        rfc1123 = await self.extract_value_from_header_by_key(request)
        if not rfc1123:
            value = None
        else:
            dt_str, dt_data = rfc1123[:25], rfc1123[25:]

            if dt_data.strip() not in ("", "GMT"):  # empty str assumes ok
                raise DateFormatError(
                    "Date header in wrong format, has to match rfc1123.",
                    error_response=self.error_response,
                )

            try:
                value = self.rfc1123_to_dt(dt_str.strip())
            except ValueError as e:
                raise DateFormatError(
                    str(e), error_response=self.error_response
                )
        return value

        Has to be as stated in rfc2616 which uses rfc1123. Has to be in GMT.
        Returns UTC datetime.

        Examples allowed:     Wed, 01 Jan 2020 04:27:12 GMT     Wed, 01
        Jan 2020 04:27:12
        
starlette_context/plugins/date_header.py