Build minimal environ dict for access logging.
(self, request, sockname, peername)
| 1773 | return scope |
| 1774 | |
| 1775 | def _build_http2_environ(self, request, sockname, peername): |
| 1776 | """Build minimal environ dict for access logging.""" |
| 1777 | environ = { |
| 1778 | "REQUEST_METHOD": request.method, |
| 1779 | "RAW_URI": request.uri, |
| 1780 | "PATH_INFO": request.path, |
| 1781 | "QUERY_STRING": request.query or "", |
| 1782 | "SERVER_PROTOCOL": "HTTP/2", |
| 1783 | "REMOTE_ADDR": peername[0] if peername else "-", |
| 1784 | } |
| 1785 | |
| 1786 | for name, value in request.headers: |
| 1787 | key = "HTTP_" + name.replace("-", "_") |
| 1788 | environ[key] = value |
| 1789 | |
| 1790 | return environ |
no outgoing calls
no test coverage detected