If cookies are enabled, update the stored cookies from any ``Set-Cookie`` headers in the response. :meta private: .. versionadded:: 2.3
(
self, server_name: str, path: str, headers: list[str]
)
| 957 | environ.pop("HTTP_COOKIE", None) |
| 958 | |
| 959 | def _update_cookies_from_response( |
| 960 | self, server_name: str, path: str, headers: list[str] |
| 961 | ) -> None: |
| 962 | """If cookies are enabled, update the stored cookies from any ``Set-Cookie`` |
| 963 | headers in the response. |
| 964 | |
| 965 | :meta private: |
| 966 | |
| 967 | .. versionadded:: 2.3 |
| 968 | """ |
| 969 | if self._cookies is None: |
| 970 | return |
| 971 | |
| 972 | for header in headers: |
| 973 | cookie = Cookie._from_response_header(server_name, path, header) |
| 974 | |
| 975 | if cookie._should_delete: |
| 976 | self._cookies.pop(cookie._storage_key, None) |
| 977 | else: |
| 978 | self._cookies[cookie._storage_key] = cookie |
| 979 | |
| 980 | def run_wsgi_app( |
| 981 | self, environ: WSGIEnvironment, buffered: bool = False |
no test coverage detected