Skip to content
Myr

Make the regular tests pass

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

I broke Digest Auth completely

authored by Ian Cordasco · committed by Ian Cordasco · parent 73635df · Browse files · 1 file+11 added−9 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+11 added−9 removed

  • other:+11 added−9 removed

1 file+11 added−9 removed

modified:requests/auth.py+11 added-9 removed
157 unmodified lines
158 # Consume content and release the original connection159 # to allow our new request to reuse the same one.160 r.content161 r.raw.release_conn()162 prepared_request = PreparedRequest()163 prepared_request.url = r.request.url164 prepared_request.body = r.request.body165 prepared_request.headers = r.request.headers.copy()166 prepared_request.hooks = r.request.hooks167 prepared_request.prepare_cookies(r.cookies)162 prep = PreparedRequest()163 prep.method = r.request.method164 prep.url = r.request.url165 prep.body = r.request.body166 prep.headers = r.request.headers.copy()167 prep.hooks = r.request.hooks168 prep.prepare_cookies(r.cookies)169169 r.request.headers['Authorization'] = self.build_digest_header(r.request.method, r.request.url)170 _r = r.connection.send(prepared_request, **kwargs)170 prep.headers['Authorization'] = self.build_digest_header(171 prep.method, prep.url)172 _r = r.connection.send(prep, **kwargs)173 _r.history.append(r)172 _r.request = prepared_request174 _r.request = prep175176 return _r177178 setattr(self, 'num_401_calls', 1)
8 unmodified lines