Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

outgoing_http: Document what the purpose of OutgoingSession is.

Alex Vandiver4d58ae661b44
diff --git a/zerver/lib/outgoing_http.py b/zerver/lib/outgoing_http.py
index 62ebcd8339b..2dadf2b90f8 100644
--- a/zerver/lib/outgoing_http.py
+++ b/zerver/lib/outgoing_http.py
@@ -8,6 +8,17 @@ from zproject.config import get_config
class OutgoingSession(requests.Session):
+ """Reasonable outgoing HTTP request defaults.
+
+ This class exists to force requests through the Smokescreen
+ proxy, enforce that requests have timeouts set, and to provide an
+ easy way for them to include retries. The 'Role' is currently
+ unused -- Smokescreen does not currently consume the
+ X-Smokescreen-Role header, but may do so in the future for
+ additional ACL'ing of destinations and/or logging.
+
+ """
+
def __init__(
self,
role: str,