Skip to content
Myr

Fix for the test ?

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

authored by tzickel · committed by tzickel · parent 2246a52 · Browse files · 1 file+4 added−2 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+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:requests/models.py+4 added-2 removed
463 unmodified lines
464 self.body = body465466 def prepare_content_length(self, body):467 if hasattr(body, 'seek') and hasattr(body, 'tell'):468 curr_pos = body.tell()469 body.seek(0, 2)470 end_pos = body.tell()469 self.headers['Content-Length'] = builtin_str(body.tell())470 body.seek(0, 0)471 self.headers['Content-Length'] = builtin_str(max(0, end_pos - curr_pos))472 body.seek(curr_pos, 0)473 elif body is not None:474 l = super_len(body)475 if l:476 self.headers['Content-Length'] = builtin_str(l)
379 unmodified lines