Skip to content

Commit a0c0672

Browse files
michael-ojborean93
authored andcommitted
Mention non-existing expect continue support in py-requests requires preemptive auth in many cases (#40)
This fixes #40 Signed-off-by: Michael Osipov <michael.osipov@siemens.com>
1 parent 0402d14 commit a0c0672

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ behavior can be altered by setting ``opportunistic_auth=True``:
141141
>>> r = requests.get("https://windows.example.org/wsman", auth=gssapi_auth)
142142
...
143143
144+
`Expect-Continue`
145+
^^^^^^^^^^^^^^^^^
146+
147+
Since `httplib <https://bugs.python.org/issue1346874>`_ does not support the
148+
`Expect-Continue` header, a request with a body will fail with
149+
``401 Unauthorized`` and must be repeated with a GSSAPI exchange. This causes
150+
several issues:
151+
152+
* Additional overhead for request retransmission
153+
* Requests with non-repeatable bodies will fail
154+
* Some servers will already send the approriate error response while your
155+
client is still streaming the request. Not all reverse proxies can handle that
156+
properly and will rather fail.
157+
158+
Therefore, in such cases you must enable opportunistic authentication.
159+
144160
Hostname Override
145161
-----------------
146162

0 commit comments

Comments
 (0)