From 210423cbf65de816705ca5fd86697ae4fb3c5e1b Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Wed, 22 Dec 2021 13:14:40 +0100 Subject: [PATCH] Mention non-existing expect continue support in py-requests requires preemptive auth in many cases (#40) This fixes #40 Signed-off-by: Michael Osipov --- README.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.rst b/README.rst index b0e9d41..6e3456e 100644 --- a/README.rst +++ b/README.rst @@ -141,6 +141,22 @@ behavior can be altered by setting ``opportunistic_auth=True``: >>> r = requests.get("https://windows.example.org/wsman", auth=gssapi_auth) ... +`Expect-Continue` +^^^^^^^^^^^^^^^^^ + +Since `httplib `_ does not support the +`Expect-Continue` header, a request with a body will fail with +``401 Unauthorized`` and must be repeated with a GSSAPI exchange. This causes +several issues: + +* Additional overhead for request retransmission +* Requests with non-repeatable bodies will fail +* Some servers will already send the approriate error response while your + client is still streaming the request. Not all reverse proxies can handle that + properly and will rather fail. + +Therefore, in such cases you must enable opportunistic authentication. + Hostname Override -----------------