Skip to content
Myr

Release connection in digest auth 401 handler to allow the connection to be reused.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Peter Montagner · committed by Peter Montagner · parent cb0fdd8 · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:requests/auth.py+5 added
225 unmodified lines
226 base += ', algorithm="%s"' % algorithm227 if qop:228 base += ', qop=auth, nc=%s, cnonce="%s"' % (ncvalue, cnonce)229230 # Consume content and release the original connection 231 # to allow our new request to reuse the same one.232 r.content233 r.raw.release_conn()234235 r.request.headers['Authorization'] = 'Digest %s' % (base)236 r.request.send(anyway=True)237 _r = r.request.response238 _r.history.append(r)
131 unmodified lines